Author Topic: Exiftool reduces the resolution of jpgs  (Read 575 times)

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3485
Re: Exiftool reduces the resolution of jpgs
« Reply #30 on: April 28, 2020, 02:32:52 PM »
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?
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

sevy

  • Jr. Member
  • **
  • Posts: 28
Re: Exiftool reduces the resolution of jpgs
« Reply #31 on: April 28, 2020, 03:02:44 PM »
no problem, how do you want to receive the files ?

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3485
Re: Exiftool reduces the resolution of jpgs
« Reply #32 on: April 28, 2020, 03:47:01 PM »
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.
Code: [Select]
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
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16317
    • ExifTool Home Page
Re: Exiftool reduces the resolution of jpgs
« Reply #33 on: April 28, 2020, 08:03:36 PM »
Nice.  Well done.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).