Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

.TIF files are saving out huge, a lot of XML is attached to them

Community Beginner ,
May 14, 2019 May 14, 2019

Copy link to clipboard

Copied

I'm new to CC, and don't believe I had this problem on CS6 or before (or I somehow turned it off), but here goes:

I have an image in Photoshop that is a single layer (flattened to background), 720x108 pixel 8-bit image.  When I save it as an uncompressed .TIF image, I get a file that's nearly 24mb in size.  It should be about 240kb

Even if I apply LZH compression, the file comes out almost exactly the same size: 23.9mb or something close.

The problem is that the file is not being saved as a binary graphic file (or some huge amount of metadata is being added to it), when I open the file in a text editor, I get this:

Adobe Photoshop CC 2019 (Windows) 2019:05:09 15:26:47 <?xpacket begin="ï " id="W5M0MpCehiHzreSzNTczkc9d"?>

<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c145 79.163499, 2018/08/13-16:40:22        ">

   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

      <rdf:Description rdf:about=""

            xmlns:xmp="http://ns.adobe.com/xap/1.0/"

            xmlns:dc="http://purl.org/dc/elements/1.1/"

            xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"

            xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"

            xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"

            xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"

            xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/">

         <xmp:CreatorTool>Adobe Photoshop CC (Macintosh)</xmp:CreatorTool>

         <xmp:CreateDate>2015-04-09T21:02:44-07:00</xmp:CreateDate>

         <xmp:ModifyDate>2019-05-09T15:26:47-07:00</xmp:ModifyDate>

         <xmp:MetadataDate>2019-05-09T15:26:47-07:00</xmp:MetadataDate>

         <dc:format>image/tiff</dc:format>

         <photoshop:ColorMode>3</photoshop:ColorMode>

         <photoshop:DocumentAncestors>

            <rdf:Bag>

               <rdf:li>0</rdf:li>

               <rdf:li>00002653DDF4551C0B851E0019C5A3A2</rdf:li>

               <rdf:li>0000A6C7815905497C2762FB3073AC1B</rdf:li>

               <rdf:li>0000A7A0DD407050F4535103853B5E9D</rdf:li>

               <rdf:li>0000BFCC89FA5177345E24AC5680E088</rdf:li>

               <rdf:li>00017C97C28B0C407DB5E9F93F00B063</rdf:li>

               <rdf:li>0001B44A5D016AE4A6C278B3F2ED6BBF</rdf:li>

and this continues for about 355,000 lines of text...  There appears to be some binary at the very end of the file, so maybe this is just a massive 24mb header?

Is there anyway I can turn this off so these files aren't so large?  It slows down opening them noticeably, especially if I have to open dozens of them...

The only work-around I've found so far is to take a screen shot of the image, create a new document in Photoshop, paste it and save it.  That makes them the size I expect (although they still have a tiny XML header attached to them, I'd like to remove this completely.  But I'll take a few kb over 24mb for sure!)...

This massive XML also seems to be saved in the .PSD file itself.  The PSD I'm saving this out of is also about 28mb (for a single-layer 8-bit 720x108 graphic).

When I save the new PSD using the screen-shot of the graphic, it's only about 361kb...

I'm just really curious what's going on and how to turn it off...  (I tried turning off the compatibility mode when saving the PSD, but that had no affect on the PSD or the TIF saved afterwards.)

Views

3.4K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
May 14, 2019 May 14, 2019

Copy link to clipboard

Copied

There was suppose to be a fix for that in the 20.02 update.

https://helpx.adobe.com/photoshop/kb/fixed-issues.html

(under January 2019 (version 20.0.2) release)

'photoshop:DocumentAncestors'

If in photoshop you go to Help>System Info and read the top line, what Photoshop Version does it list?

In the meantime you could try using File>Export As>PNG with Metadata set to None.

Then reopen that PNG and save it as a TIFF.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Sadly a well known issue for some. There are also many scripts for Photoshop, Bridge or even using 3rd party utilities such as ExifTool to remove this photoshop:DocumentAncestors metadata. Search the Photoshop/Photoshop scripting or the Bridge/Bridge Scripting forums for more info. I had a blogpost listing the half dozen or so methods to clean this data, however, my blog is currently down.

https://forums.adobe.com/message/8456985#8456985

https://forums.adobe.com/message/9671488#9671488

https://forums.adobe.com/thread/290238

https://forums.adobe.com/thread/1880847

https://forums.adobe.com/thread/290238   

https://forums.adobe.com/thread/1880847   

https://forums.adobe.com/thread/2340460   

The ExifTool command line code is simple enough:

exiftool -XMP-photoshop:DocumentAncestors= -r 'FILEorDIRECTORYpath'

or

exiftool overwrite_original -XMP-photoshop:DocumentAncestors= -r 'FILEorDIRECTORYpath'

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Yeah, I finally found out what was causing it, this DocumentAncestors thing...

And I did find some of the old posts (even the link to your blog, that Windows Defender wouldn’t even let me try to go to...)

So I’ve found work arounds like the Exif tool

But I started to realize it was putting this data in ALL of my files (PNG, jpg, TIF, etc). All of them were somewhere between 6mb and 25mb bigger than they should be. (Keep in mind, these are tiny graphics, they shouldn’t be more than 6-220kb for a lot of them.)

I guess my question now is this- is there seriously not a way to make a program that I have to pay hundreds of dollars a year to use to stop creating this waste of space in the first place?  I dont ever want a single ‘DocumentAncestor’ tag saved in any of my files, EVER...  and when I save as a .TIF or jpg, I don’t want any metadata at all, just the binary file. This should be a preference setting in the program. I shouldn’t have to go to a legacy save option (for web) to get the metadata removed (And that only works for some format), or run some script or download a free tool to strip it out...  I just can’t believe there isn’t a simple way, within Photoshop, to remove this...

For now, the solution that I’ve found that works the best is to open a PSD, and just copy all of the layers into a new document and save out from there.  That removes it all...  But If this is a well known issue, there needs to be a way to simply remove it...  I don’t even want it saved in the PSD.

Thanks for the tips and advice. Once I knew what to search for I found several threads discussing it.  It was just hard to figure out what I should have been searching for... 

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

The best that I can offer is to install a Photoshop script, then setup the Script Events Manager to automatically run the script whenever opening or saving files.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

What is your EXACT version of Photoshop? We can see from your XML you are using CC 2019, but which release?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

It was installed from the Cloud service about 3 weeks ago...  But I won’t be back to my computer until tomorrow, I’ll get the exact version then.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Here's the version info from the System Info box:

Version 20.0.4 20190227.r.76 2019/02/27; 1205725 x64

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Ok, that should definitely include the fix. I asked because failed updates (with no warning) are a big issue for many.

I wonder if anyone has more info on what Adobe fixed, or the underlying problem, than what it says in the release notes for 20.0.2, which is, in full "The raw metadata for some Photoshop files has excessive number of entries of 'photoshop:DocumentAncestors'. How do they get there, and what was changed? If something in Photoshop strips them out, what? Or does nothing strip them, but it stops adding any more?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

They are put there for a reason, Adobe want them there for tracking/forensics purposes. What is "normal" or "excessive" is up for debate.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

If they are forensics tracking, then good practice would be to have an opt-in, with full explanations. This is otherwise arguably in breach of european law.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

I'm not a lawyer, so I can't comment there, however there is no personal identifiable info AFAIK, it is a code that relates to a file that has been placed or copied/pasted. I agree, there should be an opt-in or opt-out (however that may circumvent the usefulness for forensics somewhat, just as metadata stripping does).

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Still hoping for an explanation of what Adobe changed. They say they changed something in 20.0.2, but what? Also, does anyone know if these are an industry standard, or an Adobe addition to metadata?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 15, 2019 May 15, 2019

Copy link to clipboard

Copied

Metadata comes in all shapes and forms, in this case the XMP metadata belongs to Photoshop (not EXIF, not IPTC etc).

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 17, 2019 May 17, 2019

Copy link to clipboard

Copied

So these techniques seem to work for single layer images...  How do I remove these Ancestor tags from a .PSD?  Apparently every single layer (or image file in each layer) in a PSD has it's own set of 100,000+ Ancestor tags, which is making files that should be about 400 mb almost 1 GB, and I assume they will only continue to get larger...

Is there an easy way to strip these tags out of the entire PSD?  (Not the PSD's personal header/metadata, but from every image used in it?)

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 17, 2019 May 17, 2019

Copy link to clipboard

Copied

Is there an easy way to strip these tags out of the entire PSD?  (Not the PSD's personal header/metadata, but from every image used in it?)

Do you mean embedded smart objects?

The ExifTool command code listed in my post #2 removes all photoshop:DocumentAncestors metadata.

This Photoshop script should do so as well:

Inflated JPG File Size  - Photoshop Document:Ancestors Metadata

Or perhaps this one:

Re: How can I remove junk RAW DATA from file?

And then there is also Bridge:

https://forums.adobe.com/thread/290238

https://forums.adobe.com/thread/1880847

https://forums.adobe.com/thread/2340460

However, I have not tried with "nested" files that may have metadata inside the smart object layers...

Can you post a download link to a sample file that is giving you problems?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 17, 2019 May 17, 2019

Copy link to clipboard

Copied

I'm not exactly sure which elements have these tags associated with them.  I just know that if I open the PSD in a hex editor, I can see all the DocumentAncestors at the start of the file, which I expect (the PSD file's metadata), but then there will be a section of binary data (the graphics themselves), then another batch of metadata with DocumentAncestors, another chunk of binary, etc.  This repeats about 14 times in this particular PSD.

The ExifTool using this command:

exiftool overwrite_original -XMP-photoshop:DocumentAncestors= -r 'FILEorDIRECTORYpath'

Only removes the DocumentAncestors from that first section.  It didn't touch the ones further in the file.  Basically it just edited the metadata for the PSD itself, but didn't do anything to the metadata embedded the file that is associated with the individual layers or graphics.  I think once it finds the end of the first metadata/exif section it doesn't look deeper into the file for more.  A single image (jpg, etc) likely would never have more than one metadata section in it...

I'll try the Photoshop scripts and see if they work.  Since the are used in PS, maybe they'll be a little more aware of layers and such...

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 17, 2019 May 17, 2019

Copy link to clipboard

Copied

What about multiple applications of the ExifTool command, does a second run remove the next block of tags?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 17, 2019 May 17, 2019

Copy link to clipboard

Copied

No, just reports something like 'No changes made to file'

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 17, 2019 May 17, 2019

Copy link to clipboard

Copied

A sample file would help then, as this will likely require scripting.

I imagine a script recurse through all smart object layers, edit contents, remove photoshop:DocumentAncestors metadata, save/close, then save the main file, perhaps removing the offending metadata one last time for good measure!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 17, 2019 May 17, 2019

Copy link to clipboard

Copied

Okay, I'll come up with one...  I can't share the one I'm working (not my work), but I can create a generic one that still has all the metadata in it...  I'll post after the weekend. 

Thanks for the help!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 17, 2019 May 17, 2019

Copy link to clipboard

Copied

LATEST

Thanks, the layered image could be cropped down to 1x1 px in size, it is all about the metadata and not the content. I'm new to scripting so I'll see how I go.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines