Exiftool reduces the resolution of jpgs

Started by Scriptero, April 23, 2020, 08:25:39 PM

Previous topic - Next topic

StarGeek

sevy, would you mind sharing (or creating a new) image for all three of your steps so we can figure out the tags the hold the resolution in case someone comes along at a later time looking to solve a similar problem?
* 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).

sevy

no problem, how do you want to receive the files ?

StarGeek

Got the files, thank you sevy.

I can't be completely sure as Adobe Bridge doesn't appear to show a resolution for PNG files, at least I can't find one, and my Lightroom is so old that it doesn't even load PNG files, but it looks like the resolution is in the PNG-pHYs group.  Specifically, the PixelsPerUnitX, PixelsPerUnitY, and PixelUnits tags.
C:\>exiftool -g1 -a -s -PNG-pHYs:all Y:\!temp\st -ext png
======== Y:/!temp/st/01_300dpi.png
---- PNG-pHYs ----
PixelsPerUnitX                  : 11811
PixelsPerUnitY                  : 11811
PixelUnits                      : meters
======== Y:/!temp/st/01_300dpi_et.png
======== Y:/!temp/st/02_300dpi_et_manual change.png
---- PNG-pHYs ----
PixelsPerUnitX                  : 11811
PixelsPerUnitY                  : 11811
PixelUnits                      : meters
    1 directories scanned
    3 image files read


So, to add onto the original command
exiftool -r -all= -TagsFromFile @ -*resolution* -PNG-pHYs:all -ext jpg -ext pdf -ext ai -ext png -ext tif -ext psd -overwrite_original /path/to/files/

Thanks again for the help, sevy
* 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).

Phil Harvey

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