Package: libtiff-tools Version: 3.8.2-7 Severity: normal
Nikon cameras produce a special TIFF format for raw images that Nikon calls "*.NEF" files. The "file" utility identifies them as tiffs, and I would expect the tiff tools to handle them reasonably well. I have some NEF files sent to me by the user of a Nikon D300, which is a high-end, professional-quality camera. Some of the images can be decoded correctly, and some (those larger than about 20MB) can't. While trying to identify that problem, I discovered that even the NEF files that can be displayed by ufraw and other image utilities cause tiffinfo to segfault. Curiously, tiffdump managed to slog through them with no serious problems; so I assume that either the problem is some error in tiffinfo, or that tiffinfo calls some library routine that tiffdump does not (in which case the bug probably belongs to libtiff4). Here's the screen output from tiffinfo for a typical example: $ tiffinfo *1984*F TIFFReadDirectory: Warning, EDD_1984.NEF: unknown field with tag 36867 (0x9003) encountered. TIFFReadDirectory: Warning, EDD_1984.NEF: unknown field with tag 37398 (0x9216) encountered. TIFF Directory at offset 0x8 (8) Subfile Type: reduced-resolution image (1 = 0x1) Image Width: 160 Image Length: 120 Resolution: 300, 300 pixels/inch Bits/Sample: 8 Compression Scheme: None Photometric Interpretation: RGB color Orientation: row 0 top, col 0 lhs Samples/Pixel: 3 Rows/Strip: 120 Planar Configuration: single image plane SubIFD Offsets: 145368 145488 Make: NIKON CORPORATION Model: NIKON D300 Software: Ver.1.00 DateTime: 2008:03:19 01:10:25 Reference Black/White: 0: 0 255 1: 0 255 2: 0 255 EXIFIFDOffset: 480 GPSIFDOffset: 87750 Tag 36867: 2008:03:19 01:10:25 Tag 37398: 1,0,0,0 TIFFReadCustomDirectory: Warning, EDD_1984.NEF: wrong data type 3 for "GainControl"; tag ignored. TIFF Directory at offset 0x1e0 (480) Segmentation fault For comparison, here's the output from tiffdump for the same file: $ tiffdump *1984*F EDD_1984.NEF: Magic: 0x4d4d <big-endian> Version: 0x2a Directory 0: offset 8 (0x8) next 0 (0) SubFileType (254) LONG (4) 1<1> ImageWidth (256) LONG (4) 1<160> ImageLength (257) LONG (4) 1<120> BitsPerSample (258) SHORT (3) 3<8 8 8> Compression (259) SHORT (3) 1<1> Photometric (262) SHORT (3) 1<2> Make (271) ASCII (2) 18<NIKON CORPORATION\0> Model (272) ASCII (2) 11<NIKON D300\0> StripOffsets (273) LONG (4) 1<87768> Orientation (274) SHORT (3) 1<1> SamplesPerPixel (277) SHORT (3) 1<3> RowsPerStrip (278) LONG (4) 1<120> StripByteCounts (279) LONG (4) 1<57600> XResolution (282) RATIONAL (5) 1<300> YResolution (283) RATIONAL (5) 1<300> PlanarConfig (284) SHORT (3) 1<1> ResolutionUnit (296) SHORT (3) 1<2> Software (305) ASCII (2) 10<Ver.1.00 \0> DateTime (306) ASCII (2) 20<2008:03:19 01:10:25\0> SubIFD (330) LONG (4) 2<145368 145488> ReferenceBlackWhite (532) RATIONAL (5) 6<0 255 0 255 0 255> 34665 (0x8769) LONG (4) 1<480> 34853 (0x8825) LONG (4) 1<87750> 36867 (0x9003) ASCII (2) 20<2008:03:19 01:10:25\0> 37398 (0x9216) BYTE (1) 4<00 00 00 0x1> If it's any help, ufraw's "log" reports: EXIF data read using exiv2, buflen 4292 Warning: Size 5291 of Exif.Nikon3.0x0091 exceeds 4096 bytes limit. Not decoded. -- in spite of which, it displays the image correctly. (This same warning appears in the log for the images that don't display correctly, so it may be irrelevant.) The smallest file I have that shows this problem is about 18MB in size, and I'd need to get the photographer's permission to post a sample on a website. I'll mail you a file if you like; please consider that I'm on a modem so it will take about an hour to send one of these images anywhere.... -- System Information: Debian Release: 4.0 APT prefers stable APT policy: (500, 'stable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-6-k7 Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Versions of packages libtiff-tools depends on: ii libc6 2.3.6.ds1-13etch5 GNU C Library: Shared libraries ii libjpeg62 6b-13 The Independent JPEG Group's JPEG ii libtiff4 3.8.2-7 Tag Image File Format (TIFF) libra ii zlib1g 1:1.2.3-13 compression library - runtime libtiff-tools recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]