//1 inclusive 2 exclusive Picture crop(int x1, y1, x2, y2){ uint width = x2 - x1; uint height = y2 -y1; ubyte[] data; uint current; for(uint y = y1; y < y2; y++){ current = this.width * y + x1; data ~= this.data[current..current + width]; } return new Picture(data, width, height); }