Removing thumbnails from JPEG images
Monday, September 1, 2014
Removing thumbnails from JPEG images
JPEG images downloaded from a digital camera often contain thumbnails in the EXIF metadata, which Windows 7 appears to use for the thumbnails shown in folders.
Unfortunately not every image editor also updates the thumbnails. As a result, changes to images are only visible on the full image, not on the thumbnail preview.
That's where the marvelous ExifTool library and command-line application by Phil Harvey come into play. This one-liner removes the thumbnail image and related size information, and sets the file modification timestamp to the capture timestamp:
exiftool -if "$exif:IFD1:XResolution" "-filemodifydate<datetimeoriginal" -ext jpg -IFD1:all= %*
Combined with Matt Ginzton's CmdUtils, the full batch script for Windows removes image backup copies before and after processing:
@echo off
if exist *.JPG_original recycle -f *.JPG_original
exiftool -if "$exif:IFD1:XResolution" "-filemodifydate<datetimeoriginal" -ext jpg -IFD1:all= %*
if exist *.JPG_original recycle -f *.JPG_original
Unfortunately not every image editor also updates the thumbnails. As a result, changes to images are only visible on the full image, not on the thumbnail preview.
That's where the marvelous ExifTool library and command-line application by Phil Harvey come into play. This one-liner removes the thumbnail image and related size information, and sets the file modification timestamp to the capture timestamp:
exiftool -if "$exif:IFD1:XResolution" "-filemodifydate<datetimeoriginal" -ext jpg -IFD1:all= %*
Combined with Matt Ginzton's CmdUtils, the full batch script for Windows removes image backup copies before and after processing:
@echo off
if exist *.JPG_original recycle -f *.JPG_original
exiftool -if "$exif:IFD1:XResolution" "-filemodifydate<datetimeoriginal" -ext jpg -IFD1:all= %*
if exist *.JPG_original recycle -f *.JPG_original
Labels: photography