ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: Stephen Marsh on April 10, 2019, 12:05:15 AM

Title: Can’t Remove Photoshop Resolution & Unit Info
Post by: Stephen Marsh 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.exiftool.org/TagNames/Photoshop.html

So what am I missing?
Title: Re: Can’t Remove Photoshop Resolution & Unit Info
Post by: StarGeek on April 10, 2019, 01:18:55 AM
I don't have any samples to test, but this thread (https://exiftool.org/forum/index.php?topic=3690.0) might help.  You might be able to use the config file there to remove all the Photoshop ResolutionInfo with it.
Title: Re: Can’t Remove Photoshop Resolution & Unit Info
Post by: Stephen Marsh 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:

[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.
Title: Re: Can’t Remove Photoshop Resolution & Unit Info
Post by: StarGeek on April 10, 2019, 12:17:47 PM
Just in case, you should also watch out for resolution data in the JFIF block.
Title: Re: Can’t Remove Photoshop Resolution & Unit Info
Post by: Stephen Marsh 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:

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

[IFD0]          ResolutionUnit                  : inches