static Pt ptFromPixelIndex(int index, int w) { ret pt(index % w, index / w); }