Exiftool cannot extract previews from DxO DNGs

Started by lokatz, April 04, 2020, 05:56:52 AM

Previous topic - Next topic

lokatz

Hello, 

I realize DxO does some quirky things with regards to its DNG implementation. 

The issue I now ran into occurs when extracting a preview from a DxO DNG file (which I created from an original NEF) using -PreviewImage: unexpectedly, the result is a full-size JPG.  Using -ThumbnailImage or -JpgFromRaw produces empty JPG files (size zero), so not an option.  I guess the problem is DxO's unusual way of including the preview (in IFD0 rather than SubIFD section):

[Exif IFD0] New Subfile Type = Reduced-resolution image
[Exif IFD0] Image Width = 358 pixels
[Exif IFD0] Image Height = 201 pixels
[Exif IFD0] Bits Per Sample = 8 8 8 bits/component/pixel
[Exif IFD0] Compression = Uncompressed
[Exif IFD0] Photometric Interpretation = RGB
[Exif IFD0] Make = NIKON CORPORATION
[Exif IFD0] Model = NIKON D7100
[Exif IFD0] Strip Offsets = 146676
[Exif IFD0] Orientation = Top, left side (Horizontal / normal)
[Exif IFD0] Samples Per Pixel = 3 samples/pixel
[Exif IFD0] Rows Per Strip = 201 rows/strip
[Exif IFD0] Strip Byte Counts = 215874 bytes
[Exif IFD0] Planar Configuration = Chunky (contiguous for each subsampling pixel)
[Exif IFD0] Software = DxO Correction Engine
...
[Exif SubIFD] New Subfile Type = Full-resolution image
[Exif SubIFD] Image Width = 5741 pixels
[Exif SubIFD] Image Height = 3222 pixels
[Exif SubIFD] Bits Per Sample = 16 16 16 bits/component/pixel
[Exif SubIFD] Compression = JPEG
[Exif SubIFD] Photometric Interpretation = Unknown colour space
[Exif SubIFD] Samples Per Pixel = 3 samples/pixel
[Exif SubIFD] Planar Configuration = Chunky (contiguous for each subsampling pixel)
[Exif SubIFD] Tile Width = 160
[Exif SubIFD] Tile Length = 144
[Exif SubIFD] Tile Offsets = [828 values]
[Exif SubIFD] Tile Byte Counts = [828 values]


(Exiftool ver 10.49, Win 10)


Is there a way I could get the reduced-resolution image from Exiftool?

Thanks, Lothar

Phil Harvey

Your output shows that the JPG is in the SubIFD, which is what ExifTool is extracting.  But it is a full-resolution image.  Odd.

ExifTool will not extract the uncompressed TIFF-format thumbnail from IFD0.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

lokatz

That's a bummer.  Well, thanks for looking into it!

Hayo Baan

Hi Lothar,

I've written a program that will extract all embedded image data (TIFF/JPG and optionally even unknown (raw data), but that's less useful). I can't provide you the code (I wrote it for a company that paid me for developing it), but I can try to extract the embedded images of files you provide to me (e.g. via we-transfer). Would that work for you?

Cheers,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

lokatz

Hi Hayo,

Much appreciate the offer.  However, I am working on some C# code that plugged into Exiftool for preview extraction, so just getting images converted won't help much.  Today I managed to solve this in code.

Best,
Lothar