Preview for PSD grabs first layer only

The PSD preview “thumbnail” works great if you only have one Photoshop layer or if your first layer makes a reasonable thumbnail. (Mine are mostly coming out as white boxes).

Has anyone messed with a way to have imagemagick “flatten” the PSD layers prior to generating the preview?

If I’m barking up the right tree, something in…

I just haven’t found something that works yet.

Thanks in advance…


I played with it some more and this works for me, if anyone else needs it:

private function getResizedPreview($stream, $maxX, $maxY) {
                $bp = new Imagick();


                //Enables flattening multi-layer PSDs

                $bp = $this->resize($bp, $maxX, $maxY);


                return $bp;

<               //Enables flattening multi-layer PSDs
<               $bp->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN);
<               //

Uses a lot of memory on large multi-layer PSDs.
Manage Imagick memusage in /etc/ImageMagick-X/policy.xml

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.