Skip to main content
Denyerpro
Known Participant
April 28, 2023
Question

PSD Filesize discrepencies with adjustment / empty layers.

  • April 28, 2023
  • 18 replies
  • 1193 views

Adding empty or adjustment layers (With no mask) to some  16 Bit PSDs seems to unecessarily bloat the filesize.

Example: 

  1. Open a 36MP camera image (198Mb)
  2. Add a new, empty layer
  3. Save the file (344Mb)

 

  1. Open a 36MP camera image (198Mb)
  2. Add a new, curves adjustment layer with no mask
  3. Save the file (344Mb)

 

It would make sense of course if by adding an adjustment layer with a mask, that the filesize increases because you have to accommodate the alpha channel. However the adjustment layer here has no alpha , and the empty layer is... empty (Though of course COULD be stored as 36million 0x0000 RGBA pixels, so perhaps this is a valid result here).

Subsequent layers don't appeart to attract this "Layer tax", so if I add 5 curves layers the filesize doesn't bloat beyond 344Mb.

Furthermore I've had a friend, also on Windows with also the latest version of PS CC perform this test, and as far as we can tell his files behave as you would expect - adjustment layers without masks do not significantly increase filesize.

Save history to medatada is turned OFF, Compress PSD/PSB is turned ON on both machines.

Some data that yeilded some very interesting results:

Base PSD image exported from Adobe Camera RAW: 206MB

- Saved as PSD plus Curves Adjustment Layer with blank mask: 171MB

- Saved as PSD plus Curves Adjustment Layer without mask: 171 MB

 

Base PSD image exported from CaptureOne 20: 206MB

- Saved as PSD plus Curves Adjustment Layer with blank mask: 339MB

- Saved as PSD plus Curves Adjustment Layer without mask: 339 MB

 

Base Uncompressed TIFF image exported from CaptureOne 20: 206MB

Immediately "Save As" the TIFF to a PSD, and reopen the PSD, then:

 -Saved as PSD plus Curves Adjustment Layer with blank mask: 135MB

- Saved as PSD plus Curves Adjustment Layer without mask: 135 MB


CaptureOne20 is perhaps indicating "Old" PSDs that demand compatibility behaviour from PS? I've posted metadata from the files below, and I can't see anything interesting in it, mind you.

 

What's really bizarre though is when I open the TIFF and Save-As to PSD which yields a smaller file than the original PSD,  despite being... the same file in terms of composition.

 


Anyone any offers?

This topic has been closed for replies.

18 replies

D Fosse
Community Expert
Community Expert
April 29, 2023

Indeed. I forgot to mention that it was Dave who discovered that bug and demonstrated it clearly with repeatable steps.

 

And like Dave, I'm still not convinced there's anything wrong this time. Give us a clear procedure to replicate, without Capture One and without intermediate saves to a different format, and we'll look again.

davescm
Community Expert
Community Expert
April 29, 2023

This was the previous issue referred to by @D Fosse  

https://community.adobe.com/t5/photoshop-ecosystem-bugs/p-version-23-has-introduced-file-compression-on-large-files-which-slows-down-saves/idc-p/13149789#M63765

The key element in getting it fixed was that it was simple to demonstrate, and replicate, using Photoshop only.

 

Dave

D Fosse
Community Expert
Community Expert
April 29, 2023

@Denyerpro 

 

OK. But there are too many uncertainties here. For one, you need to take Capture One completely out of this equation. Nobody here knows what Capture One does or why.

 

Second, something you said earlier bothers me a bit: "if the file is saved with compatibility mode enabled, and then you turn that setting OFF, the file will "remember" that this was set". Yes, of course it will! It's an actual added composite layer in the file, and that doesn't go away. And it doesn't get added if missing. It happens at save time.

 

Any valid comparison here will have to be PSD saved under these circumstances, versus PSD saved under those circumstances. And then opened under identical circumstances. Opening via TIFF is just contamination of the experiment.

 

There was a bug in Photoshop's PSD handling a while ago, so it's not that they never make mistakes, I'll grant you that. What happened there was that even when you turned off PSD compression entirely in Preferences, RLE compression would still be applied. This is less effective than "full" PSD compression, so the files were just slightly smaller than they should be. If I recall correctly this was somewhere in the v22 cycle, fixed a couple of releases later.

davescm
Community Expert
Community Expert
April 29, 2023

I may be missing something but your testing as described here does not clearly demonstrate an issue. You talk about PSDs created in Capture One but suggest an issue in Photoshop.

 

Can you simply demonstrate a Photoshop issue with clear steps that others can try and replicate. So far, my own attempts to replicate an issue showed only expected behaviour.

 

I tried setting Preferences File Handling Compatibility to 'Never' and opening a file that had been saved previously, from Photoshop, with compatibility on and was 411MB on disk. I made no changes but used Save As and the new version was saved to disk at 238MB. I then turned compatibility back to Always and used Save As again - this time it saved at 411MB.  All expected behaviour.

 

Dave

Denyerpro
DenyerproAuthor
Known Participant
April 29, 2023

It feels like you did not read beyond the first line of my reply, but that's fine, it's the internet and that happens all the time.

 

Something about the input PSD is triggering the compatibility behaviour, regardless of the setting in the preferences. The tests are quite clear now that this is the case.

Next question, and likely one for Adobe, is why - and if anything can be done to stop it, or if the setting in Preferences should be enforced / is being enforced correctly.

--
Denyerpro
DenyerproAuthor
Known Participant
April 29, 2023

The very fact that two files containing the same data can end up with a delta in filesize of over 150Mb is certainly a point of interest.

 

 

--
D Fosse
Community Expert
Community Expert
April 29, 2023

And let's keep perspective here. Nobody's bloating file sizes with empty data just for the heck of it. If there's data that needs to be saved, and it needs to comply with file format specifications, compatibility, or other requirements - then that will reflect in file sizes on disk.

 

From time to time we get these complaints about file sizes. I suspect a lot of the problem is that people are used to jpegs, which really are abnormally small. A jpeg is crunched to within an inch of its life, so to speak.

 

My own attitude towards this is very simple: file size is what it is. Image files are big, it's just a fact of life. If my disks fill up, I get bigger ones. If you keep worrying about file sizes, you're in the wrong business.

davescm
Community Expert
Community Expert
April 29, 2023

The difference between background and layer 0 is not metadata but the need for a channel to store transparency.

I have no idea how C1 saves to PSD and what options it uses for compression and compatibility. I don't use C1.

All I see is the tests in my earlier post which are as I expected.

Dave

 

Denyerpro
DenyerproAuthor
Known Participant
April 28, 2023

I can't imagine the metadata having *that* much impact on the size of the file, unless it was an enormous edit history (Not the case in this test). Your suggestion of it being channel alpha is a solid one, I think that's probably it and the size checks out. It'd be good for an Adobe engineer to weigh in on this, as it's quite confusing.

Re: RAW converters, I accounted for that by exporting from C1 as both PSD and TIFF. With the exported PSD, I see the filesize bloat. With the TIFF saved to PSD, I do not. Suspect something is causing the compatibility behaviour to be activated automatically with the C1 generated PSD, wheras the TIFF saved to PSD does not.

Note that I am NOT comparing the TIFF. That would be, as you suggest, completely pointless. I save the RAW from C1 to both a PSD and a TIFF. I immediately then "Save As" with the TIFF file to a PSD.

I then compared behaviour with the resulting PSDs, one straight from C1, the other derived from the TIFF file. I thought I'd explained the process but obviously failed to do so clearly, I'll edit the original post.

Hunch is that the C1 PSD is triggering the compatibility behaviour regardless of the state of the setting, and saving the TIFF to a new PSD creates a "New" file. I can't find anything in the metadata to suggest this, I'd have to reverse engineer the file headers in a hex editor to see if there's anything in play and that could take a very long time  - Adobe could clear this up in a minute.

(Snarky comment is thanks to over zealous mods here deleting posts of mine reporting (later verified and accepted) bugs some time ago. I should probably clear that out now, unless they get handsy with this thread too, of course 😉 )

--
davescm
Community Expert
Community Expert
April 28, 2023

Yes, I'd not noticed it before but it does make sense.

Dave