Skip to main content
Known Participant
January 16, 2019
Question

PSD file size bug

  • January 16, 2019
  • 7 replies
  • 7583 views

There is serious issue with the PSD file size.

How to reproduce:

1. Create blank document 500x500x72 pixels with one white layer - save - PSD size 162kb

2. Insert 3840x2160 image and transform it down to fit 500x500 - save - PSD Size 10mb

(So problem n1, transformed 4k image to 500x500px should not be 10mb file size)

3. Delete the layer contains the 4k image - save - PSD Size 10mb

So even after the image is deleted and i have left only one white layer the file size is still big, this dosn't make any sense.

This topic has been closed for replies.

7 replies

Legend
January 16, 2019

In my example, 768K is the size of a single layer in memory (I write that as 100%).

Once there are 2 layers there will be 3 copies (layer+layer+composite)

But then there is the history. 100 steps in the history? Has to go somewhere. Will start in memory, and then run to the scratch disk. 100 steps, 2 layers is perhaps 200 megabytes.

But some people have 100 layers. Maybe 20 GB.

But this is a very small 512 x 512 image. It adds up very fast.

Legend
January 16, 2019

In case anyone should be following my discussion of PSD file sizes

(to emphasise, I don't think that's the key point here)... I did

some tests with Photoshop 2017.

Image size: 512 x 512. Raw image data size (in memory) 768K (100%).

Filled with white (single layer). PSD size 32K (4%).

Filled with gradients (single layer). PSD size 787K (102%).

  Same gradient file as a PNG. PNG size 104K (13%).

Add one white layer behind (invisible). PSD size 1583K  (206%).

  Same file as PNG. PNG size 117K (15%).

Commentary: this shows (1) that PSD files may not compress at all

(2) once you have layers you have the composite view as well as

each layer (3) the exact same image may produce different PNG sizes

too.

Inspiring
January 16, 2019

Are we're talking about RAM memory size or file size once saved? I have been told by Adobe techs, that Photoshop will eat memory on purpose - to reserve it for when it's needed. There have been numerous discussions on the inflated RAM in the Photoshop community.

According to Adobe, if you open Photoshop - memory shows 500mb.  You open a really large file, memory goes to 4gb. You then close that large file and have zero files open in Photoshop - memory stays at 4gb. Apparently Photoshop will always retain/reserve RAM that it uses and never release it (even with purges) until you close Photoshop.

Legend
January 16, 2019

For what it's worth, a PSD image file CAN be larger than the in memory size, never mind larger than the PNG.

This is because PSD files saved in the oldest, most compatible, file format will use run length compression, which will get bigger, not smaller, for repeated horizontal gradients among other patterns. Consider too that you store each layer AND the flattened image too, so you could be looking at multiples of the memory size. Later, less compatible, PSD files will use ZIP compression, like PNG, but still have all layers + composite as an overhead.

I don't think that's the issue. It's a response to "are you saying that this 8.51kb PNG will somehow produce 4.7MB PSD?"

JJMack
Community Expert
Community Expert
January 16, 2019

Using Copy/Paste toe insety the 4K layers the free transform to size the to fit within the 500px by 500PX canvas the size og the saved PSD fine in your second step was 1.2 MB on my system not 10MB like yours. How did you incert the 4K layers? When I remover the image layers it saved as a 34KB psd

JJMack
Known Participant
January 16, 2019

The 10mb file was 10mb from Ancestor metadata as descried and his script fixed the file.

However, this still don't explain how adding 1.06mb image to a brand new document produces 2.4mb with hidden layers PSD, its not

Ancestor metadata as i run the script and its a brand new file. Where are the 100% more file size coming from is a complete misery to me.

Legend
January 16, 2019

I guess to answer that you’d need an expert to look over the ancestor metadata with you.

Known Participant
January 16, 2019

Just made another test,

1. Create brand new 500x335x72 with one white layer PSD - 43kb

2. Added 1.06mb 1249x1249px png image - hide all layers, - save - 2.39mb

3. In File info - raw data i have only around 20 lines so its not metadata.

JJMack
Community Expert
Community Expert
January 16, 2019

If you hide all layers the layer are still saved with their visibility set off all the layer data is still saved. Hiding all layer will just make  the saved full composite all white and and compress better than image data. An image layer 1249x1249 8bit RGB is 4,680,003 bytes uncompressed.

JJMack
c.pfaffenbichler
Community Expert
Community Expert
January 16, 2019

To test the metadata-suspicion:

If you save a jpg copy with »Save As« and another one with »Save for Web« (and no metadata) are the file sizes considerably different?

Known Participant
January 16, 2019

No smart Objects, just plain Free-transform with shift hold to contain proportions. But as i said i removed all images and layers except one white background layer and its still 10mb file size. Tried save as, different name, 10mb again. Export the file as for web the white image is 1.89kb png.

c.pfaffenbichler
Community Expert
Community Expert
January 16, 2019

Sounds like Ancestor Metadata and not a bug.

Try running the Script from the thread I linked to in post 1 on the image and save it before placing it a new receiving document – does this save with an expected filesize?

c.pfaffenbichler
Community Expert
Community Expert
January 16, 2019

You may be overlooking metadata.

Please see

Inflated JPG File Size - Photoshop Document:Ancestors Metadata

2. Insert 3840x2160 image and transform it down to fit 500x500

Smart Object or not?