AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2009.02.17 00:35 "[Tiff] DNG question", by Gordon Wetzstein
2009.02.17 01:49 "Re: [Tiff] DNG question", by Bob Friesenhahn
2009.02.17 04:53 "Re: [Tiff] DNG question", by Chris Cox
2009.02.17 06:00 "Re: [Tiff] DNG question", by Gordon Wetzstein
2009.02.17 08:12 "Re: [Tiff] DNG question", by
2009.02.17 16:23 "Re: [Tiff] DNG question", by Bob Friesenhahn
2009.02.17 21:14 "Re: [Tiff] DNG question", by
2009.02.20 23:13 "Re: [Tiff] DNG question", by Gordon Wetzstein

2009.02.17 00:35 "[Tiff] DNG question", by Gordon Wetzstein

Sorry for another newbie question, but I'm trying to read DNG files with libTIFF 3.8.2.

I have converted my Nikon RAW files to DNG using the Adobe DNG converter. dcraw can correctly read the files, so they should be fine. Unfortunately, I cannot access the RAW data in the file from my program.

If I just open the TIFF file and read the tags, I only access the thumbnail, because the image size is smaller and I have an RGB image. I want the RAW mosaic data, however. Calling 'TIFFReadDirectory' until it returns 0 tells me that there is only one subfile in the TIFF, so no need to bother trying to change the TIFF directory.

I also tried to get a subimage with:

uint16 numSubimages;
uint32 subimageOffset[256];

TIFFGetField(tif, TIFFTAG_SUBIFD, &numSubimages, &subimageOffset );

numSubimages is always 1. Does that mean that there is one more subimage that I can access via TIFFSetSubDirectory(tif, subimageOffset[0]) or does it mean that there is only the thumbnail? If the latter is the case, how can I access the RAW data?

Any help is highly appreciated.

Gordon