Exiftool won't remove JpgFromRaw?

Started by rrauenza, August 03, 2017, 01:16:38 PM

Previous topic - Next topic

rrauenza

I wrote a script that removes previews from Nikon NEF files (D800) and I've noticed recently it has regressed.  Reproducing the issue outside of the script shows that setting JpgFromRaw to nothing (or contents of /dev/null) doesn't work anymore.  But only that tag!

$ exiftool --list *NEF| grep Binary
Contrast Curve                  : (Binary data 578 bytes, use -b option to extract)
NEF Linearization Table         : (Binary data 624 bytes, use -b option to extract)
Jpg From Raw                    : (Binary data 4832578 bytes, use -b option to extract)
Other Image                     : (Binary data 924052 bytes, use -b option to extract)
Preview Image                   : (Binary data 104630 bytes, use -b option to extract)
Thumbnail TIFF                  : (Binary data 57816 bytes, use -b option to extract)


$ exiftool -JpgFromRaw= -overwrite_original_in_place -P  *.NEF           
    0 image files updated
    1 image files unchanged


But OtherImage works:


$ exiftool -OtherImage= -overwrite_original_in_place -P  *.NEF         
    1 image files updated

$ exiftool --list *NEF| grep Binary                           
Contrast Curve                  : (Binary data 578 bytes, use -b option to extract)
NEF Linearization Table         : (Binary data 624 bytes, use -b option to extract)
Jpg From Raw                    : (Binary data 4832578 bytes, use -b option to extract)
Preview Image                   : (Binary data 104630 bytes, use -b option to extract)
Thumbnail TIFF                  : (Binary data 57816 bytes, use -b option to extract)


Am I missing something?  Or is this an exiftool regression?

$ rpm qa | grep exiftool
perl-Image-ExifTool-10.55-1.el7.noarch

Phil Harvey

#1
Thanks for this report.

This was broken in 10.38 by this change:

  - Changed groups of Composite Preview/Thumbnail/JpgFromRaw/etc images to match
    the tags from which they are derived


I'll see what I can do about fixing this.

- Phil

Edit:  BTW, some software may have problems with the NEF if you delete an embedded image like this.
...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 ($).

rrauenza

Thank you! 

I'll pin the project to an old version http://backpan.perl.org/authors/id/E/EX/EXIFTOOL/Image-ExifTool-10.36.tar.gz for now.

Phil Harvey

Hmmm.  I've looked into this.

I specifically disabled deletion of the JpgFromRaw in 10.38.  I'm not sure why I did this.  I'll have to think hard about this to see if I can find out why.  If I don't find a good reason, I'll re-enable it in 10.61.

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