
Thread
2019.02.14 15:42 "[Tiff] TIFFWriteScanline fails in a random access mode", by JustLearning
Hello,
seems that the TIFFWriteScanline fails in a random access mode.
The break is asserted in line 53 of the file tif_dumpmode.c
The case is easily reproducible: just reverse the row order,
call TIFFWriteScanline from height-1 down to 0. Typically it fails after
processing between 10 and 50 rows of 115200 byte size each.
Was it intended for a truly random write access?
The initialization sequence looks like this:
TIFFSetField (
file,
TIFFTAG_IMAGEWIDTH,
width
);
TIFFSetField (
file,
TIFFTAG_IMAGELENGTH,
height
);
TIFFSetField (
file,
TIFFTAG_SAMPLESPERPIXEL,
4
);
TIFFSetField (
file,
TIFFTAG_BITSPERSAMPLE,
bits_per_channel // 16 in my case
);
TIFFSetField (
file,
TIFFTAG_ORIENTATION,
ORIENTATION_TOPLEFT
);
TIFFSetField (
file,