| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2006.10.14 21:22 "Re: SamplesPerPixel is 0 when loading image", by Toby ThainOn 14-Oct-06, at 10:53 AM, Anurag Singh wrote: > > On 10/14/06, Toby Thain <toby@smartgames.ca > wrote: > > On 14-Oct-06, at 9:29 AM, Anurag Singh wrote: > >> >> i have just checked IMG_4224-01.tiff, it has sampleperpixel 3. But >> why are you calling this function TIFFGetFieldDefaulted(tif, >> TIFFTAG_SAMPLESPERPIXEL, &samples_per_pixel) to know about >> sampleperpixel . > > > >>Because that tag may be omitted (default value is 1) - see spec. > > yeah . i have seen spec, but we are using libtiif here, so we have > to see this function only > int TIFFDefaultDirectory(TIFF* tif), Act the point is this libtiff > take care of it, if tag is not present then it always return > default value for important tags such as for samplesperpixel. I don't happen to use that function. --T > > If you don't believe then you can check it. > > Anurag Singh > > --Toby > >> >> i always used TIFFGetField( input_tiff, TIFFTAG_SAMPLESPERPIXEL, >> &samplesperpixel ); >> and i didn't get any problem with samplesperpixel, outcomes are >> always same during my testing period. >> >> Anurag Singh >> >> >> >> On 10/14/06, Marcel Wiesweg <marcel.wiesweg@gmx.de > wrote: >> Hi, >> >> for the application digiKam ( www.digikam.org) we are using >> libtiff in our >> image loader. A while ago we received a bug report from a user >> that opening >> certain 16-bit TIFF images failed. The report was later on >> confirmed by >> another user. >> Strangely, on other systems (on most systems, including mine) the >> test image >> loads without any problems. >> >> We investigated that the problem is that after calling >> TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, >> &samples_per_pixel); >> the value of samples_per_pixel is "0" on the affected machines, >> "3" on all >> others. This has been tested with different versions of libtiff. >> >> The full story can be found here: >> http://bugs.kde.org/show_bug.cgi?id=125916 >> >> The test image is >> http://amigos.amiga.hu/dudeeg/digikam_tiff/IMG_4224-01.tif >> >> The source of out TIFF loader can be found at >> http://websvn.kde.org/trunk/extragear/graphics/digikam/libs/dimg/ >> loaders/tiffloader.cpp?view=auto >> >> Have you any idea what to do about this? >> Thank you >> >> Marcel >> _______________________________________________ >> Tiff mailing list: Tiff@lists.maptools.org >> http://lists.maptools.org/mailman/listinfo/tiff >> http://www.remotesensing.org/libtiff/ >> >> _______________________________________________ >> Tiff mailing list: Tiff@lists.maptools.org >> http://lists.maptools.org/mailman/listinfo/tiff >> http://www.remotesensing.org/libtiff/ > > > |
|||||||