No color of extracted jpg from DNG

Started by qliu, August 30, 2019, 02:04:44 PM

Previous topic - Next topic

qliu

I have put this DNG file in google drive: https://drive.google.com/open?id=1OayJ-P_AZC11HSqpRyOtpC8MRrWlWhAc
Extracted jpg is in attachment.

You can notice this DNG image has color, but the extracted jpg doesn't.

This is the command line I tried:
exiftool -config example.config -BigImage -b --ext jpg -w .jpg .

Also tried this:

exiftool -b -PreviewImage -W! tmp.jpg RAW_LEICA_M240.DNG
Warning: [minor] Empty ApplicationNotes data - RAW_LEICA_M240.DNG
    1 output files created


Running on linux with version 10.20.

StarGeek

Exiftool doesn't edit the information extracted.  It appears that the embedded preview image is in greyscale.

Even Windows shows it as greyscale
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

qliu

The DNG file has color on my mac and also google drive. Color space is RGB for both DNG and extracted jpg.

For the windows preview you got, maybe they are also using exiftool to render the preview, which extracts the jpg as greyscale. Maybe it's because they don't decode the original DNG and the extracted jpg is greyscale. For this issue Mac and Google Drive are doing a better job than windows. I just want to make sure if this is a bug that exiftool didn't handle the color correctly or the embedded jpg is just a greyscale image, even though the color space shows RGB.

Phil Harvey

ExifTool doesn't do image manipulations.  I have no idea why the preview JPGs are B&W.

The JPEGs themselves have 3 color components, which is weird.  Looks like a Leica bug if this is straight out of the camera.

- 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 ($).

StarGeek

Quote from: qliu on August 30, 2019, 03:40:42 PM
The DNG file has color on my mac and also google drive.

Odds are that the thumbnail is being rendered from the full image.  I don't have a DNG codec installed, so Windows is probably using the embedded thumb.

QuoteColor space is RGB for both DNG and extracted jpg.
In my experience, it's pretty common for greyscale jpgs to actually be encoded with three channels.

If you want further proof, install exiv2 and run this comand 
exiv2 -ep RAW_LEICA_M240.DNG
While the resulting thumbnail is a tiff, it also is in greyscale.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

qliu

Thanks StarGeek and Phil! I agree that sometimes we can't trust the embedded jpg too much. For this case, to get a jpg preview, it's better to go through the process of decoding and encoding of image conversion.