Remove Photoshop Ancestors - No other changes

Started by aorta, June 19, 2025, 11:12:04 AM

Previous topic - Next topic

aorta

Hi guys, new to exiftool. Can anybody help me, how to remove Photoshop Document Ancestors but not delete any other tags or icc profiles. I found a previous post https://exiftool.org/forum/index.php?topic=9670.0 from @Star Geek but this deletes everything.

Phil Harvey

Did you try the first command?  (exiftool -documentancestors=)   This will remove the DocumentAncestors from the standard XMP location.

Also, what type of file are you using?  The file in the post you referenced is a PNG.

- Phil

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

aorta

Hi Phil, thanks for the reply. Yes I have tried that command on the attached jpg but it will not work?

https://filetransfer.typeform.ie/link/6DqtSadvKIIUC3RJXKVaKZ

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

aorta

Sorry Phil, my bad, I have a GEO lock on the firewall.


https://we.tl/t-vTWcfMv4nh

StarGeek

#5
Badly written JPEG. The metadata says Photoshop wrote this, but I really hope that something else was also involved.

Edit: Why is everything in APP13? EXIF data is supposed to be in APP1.
Warning                        : [minor] IPTC TimeCreated too short (6 bytes; should be 11)
Warning                        : [minor] Non-standard XMP at JPEG-APP13-Photoshop-XMP
Warning                        : [minor] Non-standard EXIF at JPEG-APP13-Photoshop-EXIFInfo-IFD0
Warning                        : [minor] Odd offset for IFD0 tag 0x011a XResolution
Warning                        : [minor] Odd offset for IFD0 tag 0x011b YResolution
Warning                        : [minor] Odd offset for IFD0 tag 0x0131 Software
Warning                        : IFD1:ThumbnailLength is zero
Warning                        : IPTCDigest is not current. XMP may be out of sync
Warning                        : [minor] Unknown APP1 'II*' segment
Warning                        : [minor] IFD0 tag 0x0100 ImageWidth is not allowed in JPEG
Warning                        : [minor] IFD0 tag 0x0101 ImageHeight is not allowed in JPEG
Warning                        : [minor] IFD0 tag 0x0102 BitsPerSample is not allowed in JPEG
Warning                        : [minor] IFD0 tag 0x0103 Compression is not allowed in JPEG
Warning                        : [minor] IFD0 tag 0x0106 PhotometricInterpretation is not allowed in JPEG
Warning                        : [minor] IFD0 tag 0x0115 SamplesPerPixel is not allowed in JPEG
Warning                        : [minor] IFD0 tag 0x011c PlanarConfiguration is not allowed in JPEG
Validate                        : 16 Warnings (14 minor)

I was able to fix the important parts of the file with this command, but some of the Photoshop specific tags were lost.
C:\>exiftool -P -overwrite_original -Photoshop:all=  -TagsFromFile @ -EXIF:All -ColorSpaceTags -Photoshop:all -XMP:All -iptc:all -DocumentAncestors= "Y:\!temp\x\y\test-photoshop document ancestors.jpg"
Warning: IPTCDigest is not current. XMP may be out of sync - Y:/!temp/x/y/test-photoshop document ancestors.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -DocumentAncestors "Y:\!temp\x\y\test-photoshop document ancestors.jpg"

C:\>

Re-edit: Made mistake with diff
Edit: Actually, it looks like the command did save everything. Here's the diff
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

I'm guessing that this may happen when using some software (don't know what) to convert between file formats.  I'm thinking that PSD to JPG could do it because in the PSD format both XMP and EXIF are stored in the Photoshop IRB resources.  However, this shouldn't be where they are located in a JPEG image.  ExifTool will read them from there, but won't write them there.  These are the relevant warnings from StarGeek's post:

Warning                        : [minor] Non-standard XMP at JPEG-APP13-Photoshop-XMP
Warning                        : [minor] Non-standard EXIF at JPEG-APP13-Photoshop-EXIFInfo-IFD0

I don't know if it would be worth the effort to add the ability to modify the XMP and EXIF in this non-standard location.  At minimum I would first want to know more details about how it got there and what it is used for.  Then I would have to figure out a way for the user to be able to distinguish it from the standard XMP/EXIF when writing.

@StarGeek: That command does delete a bunch of Photoshop-specific information.  I think you just diff'd the file with itself. :P

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

StarGeek

Quote from: Phil Harvey on June 19, 2025, 01:46:58 PM@StarGeek: That command does delete a bunch of Photoshop-specific information.  I think you just diff'd the file with itself. :P

So I did. I thought I had made sure to copy the different file paths.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

aorta

Hi guys, thank you so much for this. We receive hundreds of files in everyday from multiple sources all over the world. They are uploaded into a XiNET DAM and we have had ongoing issues with XMP ingestion into the file.
The <xwnv> tags do not appear in the Photoshop info panel and so are lost when resaved in Photoshop.

Your command fixes this and deletes the Photoshop:DocumentAncestors. I will report this to the Xinet developers and give them your details. See a sample of the problem file linked.  https://we.tl/t-JNWBs2iM5w

StarGeek

Another thing I just noticed in both pictures is that there are two ICC_Profiles.

Phil, are multiple ICC_Profiles something allowed for by the specs? I don't recall seeing that before, but then I usually don't list that data when looking at a file.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

This is the same as the EXIF and XMP.  The second ICC_Profile is in the Photoshop IRB resources, which isn't part of any specification but I would think that Adobe puts it there in PSD files.  It has no place being there in a JPG.

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