News for hackers. Stuff that matters.
Re:Fun Photoshop File Format Facts by emehrkay on Thursday March 03, 2016 @11:19AM (#11217818)
Apparently adding a solid white layer as the upper-most layer will sometimes reduce overall file size.
Re:Fun Photoshop File Format Facts by IvanK_net on Thursday March 03, 2016 @01:29PM (#11218795)
Exactly. There is a flattened RGBA image at the end of a PSD file, which has dimensions corresponding to dimensions of a project.

Reading that flattened image from PSD takes 20 lines of code, while reading the structured content and producing final composition (blend modes, layer styles, masks, adjustment layers ...) takes at least 20 000 lines of code.

Row length encoding is used for storing channel data by default, so area with a constant color can be compressed much more efficiently, than area which has more "noisy" content.

Re:Fun Photoshop File Format Facts by Kequc on Thursday March 03, 2016 @11:26AM (#11217869)
If you're using psd filesize probably isn't your first priority.
Re:Fun Photoshop File Format Facts by Rumudiez on Thursday March 03, 2016 @12:38PM (#11218414)
I believe that's because it saves bytes when generating a flattened preview image which for high resolution PSDs can be quite expensive to do losslessly. Can anybody confirm?
Re:Fun Photoshop File Format Facts by MontagFTB on Thursday March 03, 2016 @01:09PM (#11218648)
This is likely what is going on. PSDs have a flattened, full-size version of the image embedded for compatibility's sake.

Instead of a white top-layer you could also disable the "Maximize compatibility" option when saving the PSD, which will strip out this full size rendition.

Re:Fun Photoshop File Format Facts by jzwinck on Thursday March 03, 2016 @02:36PM (#11219388)
If you disable Maximize Compatibility you also lose compatibility with current programs from Adobe itself, such as Lightroom. So while it seems like a good thing to turn off old crufty stuff, it actually is horrible.
Re:Fun Photoshop File Format Facts by Rumudiez on Thursday March 03, 2016 @02:43PM (#11219444)
I didn't know that Lightroom had that restriction, actually. Is that tested with CC 2015 versions of both programs?

I do know that Maximize Compatibility doesn't affect usage within Illustrator and InDesign documents, though, which to me are the more common use cases for a PSD anyway, so I'll probably stick to unticking that box.

Re:Fun Photoshop File Format Facts by feiss on Thursday March 03, 2016 @04:49PM (#11220329)
Or putting all layers inside a not visible group. Nothing to save (or it's very well compressed) in the flatenned preview. In large files it's a big save