Large PSDs include rasterized copies of embedded JPGs

Contributor ,
Jul 04, 2022 Jul 04, 2022

Copy link to clipboard

Copied

Problem: my print-resolution PSDs only include shape layers, embedded (smart object) JPG and PNG files, and effects. They should be relatively trim, but are bloated and enormous. Trying to share them with a printer or artist or save them in source control is cumbersome.

 

I have tried:

- disabling maximum compatibility (halved file size in some cases, not enough)

- turning off all layers (often same effect as disabling max compatibility)

- disabling thumbnails (tiny change)

- clearing work path data (tiny change)

- stripping all exif data (tiny change)

- confirmed Preferences > File Handling > "Disable Compression of PSD and PSB files" is off

 

What works:

- scaling the image down via Image > Image Size from 5000x5000 to 50x50.

 

Depending on the file, the PSD can go from 90mb > 2.5mb, or 500mb > 300mb. Even with max compatibility, thumbnails, and everything else turned on, the PSDs are massively smaller after I scale them down. This results in no loss of data, since every layer is a shape or an embedded JPG or PNG.

 

Questions:

- why is photoshop saving all these extra bits when the (vector or embedded) image is scaled up?

- can I make it stop doing that without resorting to saving files at 1% scale?

- is this a bug in 22.0.0 or has it always been this way?

 

Example files:

https://drive.google.com/open?id=187sDK3Dw6rxYR1RBK9hEHB77z3uLE_GY&authuser=sarahnorthway%40gmail.co...

TOPICS
Windows

Views

73

Likes

Translate

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

correct answers 1 Correct answer

Adobe Community Professional , Jul 10, 2022 Jul 10, 2022

- is this a bug in 22.0.0 or has it always been this way?


This is not a bug. 

 

Photoshop is a pixel oriented program, not a vector oriented one. 

And it is layer based, not node based. 

Every instance of a Smart Object is represented by the actual pixels as resulting from the scale, transformations, applied filters, … and is not just a reference to some source. 

 

If this was not the case Photoshop would, every time a file is opened, have to recreate the pixels for each instance anew, applyin

...

Likes

Translate

Translate
Adobe Community Professional ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied


- is this a bug in 22.0.0 or has it always been this way?


This is not a bug. 

 

Photoshop is a pixel oriented program, not a vector oriented one. 

And it is layer based, not node based. 

Every instance of a Smart Object is represented by the actual pixels as resulting from the scale, transformations, applied filters, … and is not just a reference to some source. 

 

If this was not the case Photoshop would, every time a file is opened, have to recreate the pixels for each instance anew, applying all those transformations and filter applications anew and causing potentially very long opening times. 

Likes

Translate

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
Contributor ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

Yeah I did figure it was probably to avoid longer opening times, that makes sense, since resizing a smart object from 50 to 5000 pixels or applying filters does take a second.

 

I guess I was just hoping for some kind of option for cases where I would rather wait 5-10 more seconds to open a file and save 50-200mb of storage space.

 

Photoshop does offer the option to disable maximum compatibility in order to reduce filesize, so I was hoping there might be some lesser-known option to do the same for saving rasterized copies of layers which could be recreated at load time. I guess I'll suggest it as a feature.

Likes

Translate

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 Professional ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

Just to support what @c.pfaffenbichler says:

quote

- disabling maximum compatibility (halved file size in some cases, not enough)


By @Sarah Northway

Maximum compatibility saves a precalculated image of all the layers of your Photoshop file with the file. Third party (and some Adobe) programs need so not to do all the calculations themselves so that you get a result the same as if Photoshop would do the live rendering. This is the extra space you save, and indeed in simple images this is undoubtedly half of the space required for the option being turned on.

 

As long as you do not need to share the source file (with a printer, for example), a high quality full resolution JPEG copy does the same effect. The final print won't differ in quality. If you need to share an intermediate file, where the receiving partner still needs to work on, you have to share the file as is, there is no work around. As for archival purposes, you absolutely have to save the full-fledged Photoshop file.

 

One “trick” I'm using for saving some space (not a lot however in most cases) is to save the file as a layered TIFF file with ZIP compression. Saving will take more time, as the lossless compression used needs to do complex calculations. But it's more effective than the faster lossless Photoshop file compression.

 

quote

What works:

- scaling the image down via Image > Image Size from 5000x5000 to 50x50.


By @Sarah Northway

If that worked, all Photoshop files would be 50×50. A Tip: you save more by doing a 1×1 picture. With a 50×50 picture, a printer would print a 50×50 picture, instead of a 5000×5000 picture. For the record: I understand well what you are doing and what happens behind the scenes, but I would never recommend one to do that. At some stage and moment, you would lose data.

ABAMBO | Hard- and Software Engineer | Photographer

Likes

Translate

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
Contributor ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

I think scaling down to 1x1 is data lossless, so long as you don't try to print it that way or forget to convert some layer to a smart object before you do it.

 

You're right about archiving though... even with the max compatibility setting on, I'd need a compatible version of Photoshop with the right fonts installed to be able to properly scale the PSD back up in the future. It's a risky long term move. Layered TIFF is a good suggestion for some cases, thanks!

Likes

Translate

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 Professional ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

quote

Layered TIFF is a good suggestion for some cases, thanks!


By @Sarah Northway

Using 7Zip is probably as effective. I use TIFF files for anything where I do know that I will not access the layers via InDesign. InDesign has a feature, that allows you to switch on and off layers in a Photoshop file. That allows you to use different scenarios from one file, wich in itself is very economically.

ABAMBO | Hard- and Software Engineer | Photographer

Likes

Translate

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 ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

A 5000 x 5000 RGB image is 5000 x 5000 x 3 bytes = 75 megabytes. Just the raw image data. So the mimimum I'd expect to find in a PSD is a 75 megabyte image. Only gentle, often barely effective compression, is used. So there no surprise there even if there is no raster content; the PSD needs one raster layer, at image size, to represent the image. 

Likes

Translate

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
Contributor ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

I think you mean the full-scale preview for windows explorer and other programs? I think that is part of the max capability setting and goes away if you turn it off.

 

The smaller compressed thumbnail can also be separately disabled.

 

But I'm pretty sure Photoshop ALSO saves a full size raster image for every layer, even if it's disabled and not visible, probably for the purposes of caching and speeding up loading. This is what I want to prevent.

Likes

Translate

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 Professional ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

quote

But I'm pretty sure Photoshop ALSO saves a full size raster image for every layer, even if it's disabled and not visible, probably for the purposes of caching and speeding up loading. This is what I want to prevent.


By @Sarah Northway

That's your smart layer. In your Photoshop file it's a full-scale image, that gets only modified, when the smart content changes.

 

As a side note:

I have created a 5k×5k photoshop image, with 2 smart objects embedded. First is a simple Illustrator file, second is a 50×50 pixels file, which has the same Illustrator file embedded as a smart object. The result speaks for itself:

Abambo_0-1657478646847.png

This is only the 8% screen preview...

ABAMBO | Hard- and Software Engineer | Photographer

Likes

Translate

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 Professional ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

quote

Only gentle, often barely effective compression, is used.


By @Test Screen Name

I prefer non-destructive versus destructive compression. Non-destructive compression allows for reconstructing the file as it was. CCIT Fax compression is a great example, but it works only well with bitmap images, where there are huge white or black surfaces. LZW is a more complex algorithm, working well on text files (where it would be catastrophic to have a destructive compression). JPEG compression and similar are playing with the visual aspect of a file. As our eye is not capturing the full extent of all the aspects of an image, you may well rearrange some elements, modify some others slightly, to allow for a good compression. That's the reason JPEG works best with natural images (a tree, a face etc) and not with text, drawings etc.

ABAMBO | Hard- and Software Engineer | Photographer

Likes

Translate

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 ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

PSD originally allowed only RLE (run length) compression of its image layers. This compresses only identical runs of the same pixels. Later versions allow ZIP, if "maximize compatibility" is off.

But (while it's hard to tell from the PSD specification) I think it is a basic rule that every PSD contain "the image data" which is to say a flattened representation of the document at its defined resolution. This is not just a thing used for preview, it's fundamental to the design of PSD. Among other things, it can be used to recover a damaged file, or one made with new features that this version never heard of.

 

Likes

Translate

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 Professional ,
Jul 10, 2022 Jul 10, 2022

Copy link to clipboard

Copied

LATEST
quote

PSD originally allowed only RLE (run length) compression of its image layers. This compresses only identical runs of the same pixels. Later versions allow ZIP, if "maximize compatibility" is off.


By @Test Screen Name

If you stay with the official documentation of Photoshop, “maximize compatibility” is for programs reading non-layered Photoshop files. It has nothing to do with compression, however. https://helpx.adobe.com/photoshop/using/file-formats.html

 

ABAMBO | Hard- and Software Engineer | Photographer

Likes

Translate

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