| 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 |
Thread2009.02.17 06:00 "Re: DNG question", by Gordon WetzsteinHey guys, thanks for the answers. I had a look at dcraw, which is a great tool, but I'm working on some de-mosaicking algorithms, so I need the CFA data. There is some sample code for a simple c DNG exporter (elphel_dng.c), which uses different TIFF directories to store the thumbnail and the raw data. Unfortunately, my DNG files only have a single TIFF directory when I open them. I can extract the RAW data with dcraw, but the code is somewhat cryptic, so I don't quite understand how to access it. Since I use the Adobe DNG converter to create the files from various different SLR cameras, I can just set the compression to none, so that shouldn't be a problem. I saw that Dave Coffin has a patch for libTIFF 3.8.2 on his website, but I'm using Windows XP and don't quite know how to apply that patch to my libTIFF. Maybe I'll give that another shot. I also had a look at the DNG SDK, but it seems huge I would like to keep my stuff as simple as possible. Thanks for your help. Gordon On Mon, Feb 16, 2009 at 8:53 PM, Chris Cox <ccox@adobe.com> wrote: > You might be better off using the DNG SDK instead of LibTIFF. > > Chris > > ________________________________________ > From: tiff-bounces@lists.maptools.org [tiff-bounces@lists.maptools.org] On > Behalf Of Gordon Wetzstein [gordon.wetzstein@gmail.com] > Sent: Monday, February 16, 2009 4:35 PM > To: tiff@lists.maptools.org > Subject: [Tiff] DNG question > > 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 > > > |
|||||||