BUG? DNG from IOS 13.6.1 - unable to update previewImage

Started by whatdoido, January 21, 2021, 04:34:03 AM

Previous topic - Next topic

whatdoido

I have a DNG generated from an IOS camera app (Halide2) - running on IOS 13.6.1 - which I am unable to add a preview image.  The same command on a sample DNG works fine so I dont know if this is problem with handling this type of DNG/corrupt file.

This DNG has no previews or thumbnails so I dont know if this could be a problem although the file can be processed by rawtherapee (I dont have LR).  Is there anything I can do to determine where the problem lies?  Using the latest exiftool (12.15) d/l and running on linux.

link to file: https://drive.google.com/file/d/1qvtwnyuT0XUHl8HiWkAt7W-4OwtyBzyz/view?usp=sharing

$ exiftool -v10 '-previewImage<=artwork.jpg' /tmp/IMG_5414.DNG


Writing All:PreviewImage if tag exists
Writing Olympus:PreviewImageValid if tag exists
Writing Olympus:PreviewImageValid if tag exists
Writing Canon:PreviewImageLength if tag exists
Writing Casio:PreviewImageLength if tag exists
Writing IFD0:PreviewImageLength if tag exists
Writing Minolta:PreviewImageLength if tag exists
Writing PreviewIFD:PreviewImageLength if tag exists
Writing Olympus:PreviewImageLength if tag exists
Writing Olympus:PreviewImageLength if tag exists
Writing Pentax:PreviewImageLength if tag exists
Writing Ricoh:PreviewImageLength if tag exists
Writing Samsung:PreviewImageLength if tag exists
Writing Sigma:PreviewImageLength if tag exists
Writing Sigma:PreviewImageLength if tag exists
Writing Sony:PreviewImageLength if tag exists
Writing IFD0:PreviewImageLength if tag exists
Writing All:PreviewImageLength if tag exists
Writing IFD0:PreviewImageLength if tag exists
Writing Canon:PreviewImageStart if tag exists
Writing Casio:PreviewImageStart if tag exists
Writing IFD0:PreviewImageStart if tag exists
Writing Minolta:PreviewImageStart if tag exists
Writing PreviewIFD:PreviewImageStart if tag exists
Writing Olympus:PreviewImageStart if tag exists
Writing Olympus:PreviewImageStart if tag exists
Writing Pentax:PreviewImageStart if tag exists
Writing Ricoh:PreviewImageStart if tag exists
Writing Samsung:PreviewImageStart if tag exists
Writing Sigma:PreviewImageStart if tag exists
Writing Sigma:PreviewImageStart if tag exists
Writing Sony:PreviewImageStart if tag exists
Writing IFD0:PreviewImageStart if tag exists
Writing All:PreviewImageStart if tag exists
Writing IFD0:PreviewImageStart if tag exists
Writing FotoStation:PreviewImage if tag exists
Writing MIE-Preview:PreviewImage
Writing Casio:PreviewImage if tag exists
Writing Minolta:PreviewImage if tag exists
Writing Olympus:PreviewImage if tag exists
Writing Leica:PreviewImage if tag exists
Writing Sony:PreviewImage if tag exists
Writing All:PreviewImage
======== /tmp/IMG_5414.DNG
Rewriting /tmp/IMG_5414.DNG...
  Editing tags in: All ExifIFD FotoStation IFD0 MIE-Preview MakerNotes TIFF
  Creating tags in: All MIE-Preview
  FileType = DNG
  FileTypeExtension = DNG
  MIMEType = image/x-adobe-dng
  Rewriting IFD0
  Rewriting ExifIFD
  Rewriting MakerNoteApple
  Copying 64 image data blocks
Nothing changed in /tmp/IMG_5414.DNG
    0 image files updated
    1 image files unchanged


Phil Harvey

ExifTool will not add a PreviewImage to a file that didn't have one.

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

whatdoido

Ah, thanks.  Is it technically achievable or is there some encrypted maker notes like stuff that prevents this functionality?

Its been a long time since I've written perl but would be interested to try to add this if its technically possible.


Phil Harvey

Technically this is possible.  But there are about a zillion different ways that preview images are stored in the various file formats, so it would never be a complete implementation.  For DNG specifically, a new SubIFD would need to be added, which would be a significant change to the file, and it would make me nervous to modify raw files like this.

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