How to "clean" a PSD file before publishing?

2

1

I want to upload .psd (Photoshop CS5) files to a subversion repository, and since the format seems so comprehensive (or maybe just bloated and convoluted), I'd like to just publish the core of the files, not useless metadata, thumbnails, or other things that would just take space or reveal unnecessary information.

So basically I'm looking for a tool that can help me clean up the files before committing them (something akin to pngcrush, but for PSD files), or instructions on how to perform that in Photoshop.

I'd like the files to retain the minimum necessary data to be edited again if necessary, and I do not need support for Photoshop versions prior to CS3, nor I use bleeding edge features such as 3D.

Edit: If you open a file with this tool, it will show how many metadata there is to PSD files: http://regex.info/exif.cgi. I'd like to get rid of the metadata at least, I'm sure the size will decrease even just by removing the embedded thumbnail and metadata.

Edit 2: This Windows tool shaves some 20KB of metadata from PSD files. It doesn't look like it removes thumbnails, but that's not a problem since I like the thumbnails as I use an enabler for them on windows. The tool is shareware, but could be of use to those interested in its other supported formats.

Camilo Martin

Posted 2011-12-03T21:19:38.960

Reputation: 2 308

Answers

2

As the link you've provided shows, the metadata in a PSD file amounts to about 30K. Removing it will have a negligible effect on the filesize.

Here's how to get a PSD file to be as small as possible:

  • Delete all necessary layers
  • Flatten/merge as many layers as you can
  • Make sure there's no data off the edge of the image that you don't need
  • When you're prompted on save, untick the "Maximize Compatibility" box
  • Zip the final PSD file.

You may think that the PSD format is "bloated", but equivalent layered TIF files are usually much larger.

Good luck!

Django Reinhardt

Posted 2011-12-03T21:19:38.960

Reputation: 4 183

The same can be said about PNGs (PNGOut rarely reduces sizes by more than 1/4), and I don't care when they're on my disk, but since they'll be on a repository, I'd like to know they're clean and optimized just like the PNGs, JPGs, archives, etc., I just can't find any good tool like there are for the other formats. Regarding PSD being smaller than TIF, well, one of the PSDs has one layer with text and layer styles and it's four-six times as large as an uncompressed TGA/BMP. Thanks for the answer. – Camilo Martin – 2011-12-12T01:16:34.700

I'm not sure what file sizes you're talking about here. PSDs are used for production artwork, and so are usually many megabytes. I regularly work with files up to 1GB in size. It sounds like you're talking about very small files indeed? – Django Reinhardt – 2011-12-12T01:43:11.587

Whoa, 1GB is quite a size. Yes, I'm talking about smaller sizes, normally not in excess of 1MB, many of them under 500KB. They're user interface elements, not photographs, and many of them contain solid shapes rendered from vector images and layer styles applied on them, so it's more that it bugs me to have one single unoptimized format rather than a real need. I just wish there were tools to clean PSDs as there are for other formats. – Camilo Martin – 2011-12-12T01:49:16.117

Ah, I guess I can see more why you'd care. I think because PSDs are already smaller than their equivalent TIF versions, and the average filesize is likely to be quite large, there isn't a great need to strip it down further. If I see something I'll pass it on, but I wouldn't hold my breath, I'm afraid. If you're doing work with vectors, have you considered trying to keep everything in AI files? – Django Reinhardt – 2011-12-12T02:06:06.190

@Jonny I must keep the PSD files because many things are done with layer effects that may be edited later. For example, this file is just a letter (done in photoshop itself), with layer styles applied to it and nothing more: http://mirrorimg.net/im1/7ec.psd The same file saved as a TIF (with transparency) is 60% smaller: http://mirrorimg.net/im1/ghd.tiff (And its PNG version is 95% smaller). Seeing those numbers I just think something useless is being stored there. Anyway thanks for the interest, I'll update the question with a tool I've just found.

– Camilo Martin – 2011-12-12T06:14:40.593

Camilo, I flattened the PSD and removed all the layer, vector, font, and styles information, and then saved it as a TIF and as a PSD. They both came out as the same size (actually the PSD was slightly smaller by 1K). Your TIF version was even smaller again, but I don't know what you did to that. – Django Reinhardt – 2011-12-13T04:03:19.040

@Jonny the problem is I don't want to flatten and remove real data from the PSDs such as styles, since they should be editable as they are. The TIF was saved from Photoshop itself, using max compression. Thank you for your continued interest. One thing I see in PSD files through a hex editor is that there is a lot of text and certain signatures that repeat themselves quite a lot: http://i.imgur.com/3c0u0.png

– Camilo Martin – 2011-12-13T04:22:07.620

You've missed my point. You're comparing filesizes with two VERY different files. The PSD contains lots of extra data that the TIF does not. If you keep all the layers, layer styles, font and vector information in the PSD, it's not really fair to say that it's unnecessarily larger. When you strip that data out, the TIF file is larger. Regardless of all this, I honestly think your time is probably better spent not on other tasks. Good luck with whatever you decide to do. – Django Reinhardt – 2011-12-14T04:11:55.553

@Jonny I agree with you. And yes, containing the same information, TIF is even larger than PSD (good thing I don't need to use TIFs!), so I'll keep them as they are. You're right about there being more important things to care about, I just asked this question in the hope of a "psdcrush" or "OptiPSD"-like utility, but since it seems there is none, I'll accept your answer for the effort and interest. Thanks again. – Camilo Martin – 2011-12-14T21:57:19.003

No problem! Good luck. – Django Reinhardt – 2011-12-15T00:00:31.843

0

One of the best things you can do to limit the size of your PSD file is to uncheck the preference option in Photoshop named "Maximize Compatibility".

You can find this option in "Edit > Preferences > File Handling".

You have to make sure you won't need to open that file with an older version of Photoshop or you'll risk being limited in your capacity to modify them (non-recognized features will be saved in a "flattened" way, thus increasing file size).

Shadok

Posted 2011-12-03T21:19:38.960

Reputation: 3 760