2010.06.24 22:32 "[Tiff] LibTIFF col_offset bug in stripped images", by Andrew Reading
Hello,
LibTIFF seems to have a bug where the RGBA interface does not take into account the col_offset value for stripped images (tiled images work fine). All images thus are read into the supplied buffer, but are always fixed to the left side of the image. The row_offset value, on the other hand, works perfectly fine. I was able to trace this down to an offset issue in the
static int gtStripContig(TIFFRGBAImage* img, uint32* raster,
uint32 w, uint32 h)
function. Around line 868,
pos = ((row + img->row_offset) % rowsperstrip) * scanline;
should read
pos = ((row + img->row_offset) % rowsperstrip) * scanline +
(img->col_offset * img->samplesperpixel);
The remaining strip functions should probably be changed accordingly.
Regards,
Andrew