2014.12.21 19:05 "Re: [Tiff] For review", by Even Rouault
Le dimanche 21 décembre 2014 19:49:45, Kai-Uwe Behrmann a écrit:
Am 21.12.2014 um 16:35 schrieb Even Rouault:
2014-12-21 Even Rouault <even.rouault@spatialys.com>
* libtiff/tif_getimage.c: TIFFRGBAImageOK(): return FALSE if LOGLUV with
SamplesPerPixel != 3, or if CIELAB with SamplesPerPixel != 3 or
BitsPerSample != 8CIELab can be 16 BitsPerSample or double/float/half. Even though the range of the later might not be perfectly agreed between various readers.
Thanks for the hint, but the pragmatic question is rather: is the code in tif_getimage.c ready to deal with BitsPerSample != 8 for CIELAB?
My feeling is no since in PickContigCase(), there was already a similar check:
case PHOTOMETRIC_CIELAB:
if (buildMap(img)) {
if
(img->bitspersample == 8)
img->put.contig
= initCIELabConversion(img);
break;
}
(My intent is just to avoid crashes, not support things that could be supported in an ideal world)
Same for LOGLUV and LOGL. Please look at TIFFTAG_PIXARLOGDATAFMT and TIFFTAG_SGILOGDATAFMT to get an idea.
For LOGLUV I only added a check on SamplesPerPixel, since indeed in the regression testsuite, there's a test case with 16 bitspersample.
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com