Write out subimages of requested size, not imageWidth x imageHeight.

The BucketRenderer now writes out partial buckets along the crop edge
on a line-by-line basis.

Also ensure that x0, y0, w0, and h0 are clamped to
(0, imageWidth)x(0, imageHeight).