Author Topic: Can’t Remove Photoshop Resolution & Unit Info  (Read 115 times)

Stephen Marsh

  • Sr. Member
  • ****
  • Posts: 215
Can’t Remove Photoshop Resolution & Unit Info
« on: April 10, 2019, 12:05:15 AM »
I wanted to remove Photoshop resolution & unit metadata, however the following command does not work:

exiftool -Photoshop:XResolution= -Photoshop:YResolution= -Photoshop:DisplayedUnitsX= -Photoshop:DisplayedUnitsY= FILE

I hate to throw the baby out with the bathwater, so I’d prefer not to use the following command:

exiftool -Photoshop:all= FILE

I believe that the tags are writable:

https://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Photoshop.html

So what am I missing?

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2372
Re: Can’t Remove Photoshop Resolution & Unit Info
« Reply #1 on: April 10, 2019, 01:18:55 AM »
I don't have any samples to test, but this thread might help.  You might be able to use the config file there to remove all the Photoshop ResolutionInfo with it.
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.

Stephen Marsh

  • Sr. Member
  • ****
  • Posts: 215
Re: Can’t Remove Photoshop Resolution & Unit Info
« Reply #2 on: April 10, 2019, 02:26:49 AM »
Thank you StarGeek!

Turns out the problem is deeper than I first thought (isn’t it always?)…

A “problem” JPEG file has the following three sets of resolution metadata:

Code: [Select]
[IFD0]          XResolution                    : 72
[IFD0]          YResolution                    : 72
[IFD0]          ResolutionUnit                 : inches
 
[IFD1]          XResolution                    : 72
[IFD1]          YResolution                    : 72
[IFD1]          ResolutionUnit                 : inches
 
[Photoshop]    XResolution                     : 72
[Photoshop]    DisplayedUnitsX                 : inches
[Photoshop]    YResolution                     : 72
[Photoshop]    DisplayedUnitsY                 : inches

Turns out that when the IFD0 and IFD1 tags above are removed and only the Adobe Photoshop resolution tags are left intact, then the image is sized correctly when placed into Adobe InDesign. This is appears to be a very specific and obscure Adobe InDesign JPEG import bug that only affects specific pixel size or aspect ratio images and is not easy to trigger, the same pixel width/height files in TIFF or PSD are not affected and the issue is not there if saving the JPEG using “save for Web” which strips most metadata.

I was just exploring if ExifTool could be used to correct the issue and provide consistent input into Adobe InDesign, whether or not a given JPEG triggers the bug or not.
« Last Edit: April 10, 2019, 07:13:22 AM by Stephen Marsh »

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2372
Re: Can’t Remove Photoshop Resolution & Unit Info
« Reply #3 on: April 10, 2019, 12:17:47 PM »
Just in case, you should also watch out for resolution data in the JFIF block.
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.

Stephen Marsh

  • Sr. Member
  • ****
  • Posts: 215
Re: Can’t Remove Photoshop Resolution & Unit Info
« Reply #4 on: April 10, 2019, 05:06:14 PM »
Thanks StarGeek, I did not come over any from an Adobe Photoshop JPEG, but I did find these when I looked at what Apple Preview was outputting… What I found curious was the following from Preview:

Code: [Select]
[JFIF]          ResolutionUnit                  : None
[JFIF]          XResolution                     : 72
[JFIF]          YResolution                     : 72

[IFD0]          ResolutionUnit                  : inches