ExifTool Forum

General => Metadata => Topic started by: aorta on June 19, 2025, 11:12:04 AM

Title: Remove Photoshop Ancestors - No other changes
Post by: aorta on June 19, 2025, 11:12:04 AM
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.
Title: Re: Remove Photoshop Ancestors - No other changes
Post by: Phil Harvey on June 19, 2025, 11:43:18 AM
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

Title: Re: Remove Photoshop Ancestors - No other changes
Post by: aorta on June 19, 2025, 12:09:12 PM
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
Title: Re: Remove Photoshop Ancestors - No other changes
Post by: Phil Harvey on June 19, 2025, 12:21:56 PM
That URL isn't working for me. :(
Title: Re: Remove Photoshop Ancestors - No other changes
Post by: aorta on June 19, 2025, 12:45:20 PM
Sorry Phil, my bad, I have a GEO lock on the firewall.


https://we.tl/t-vTWcfMv4nh
Title: Re: Remove Photoshop Ancestors - No other changes
Post by: StarGeek on June 19, 2025, 01:01:08 PM
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
Title: Re: Remove Photoshop Ancestors - No other changes
Post by: Phil Harvey on June 19, 2025, 01:46:58 PM
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
Title: Re: Remove Photoshop Ancestors - No other changes
Post by: StarGeek on June 19, 2025, 05:59:03 PM
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.
Title: Re: Remove Photoshop Ancestors - No other changes
Post by: aorta on June 20, 2025, 06:36:35 AM
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
Title: Re: Remove Photoshop Ancestors - No other changes
Post by: StarGeek on June 20, 2025, 10:29:29 AM
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.
Title: Re: Remove Photoshop Ancestors - No other changes
Post by: Phil Harvey on June 20, 2025, 11:40:38 AM
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