Encoding a PSD
Posted: 2018-11-19T04:51:06-07:00
Couple quick questions about encoding PSDs.
1 - Every layer I generate seems to have a "Lock transparent pixels" lock set on it. Is there a way to turn that off for some layers? Can I lock other layers entirely?
2 - Is it possible to replace the thumbnail layer with a completely blank layer? The PSDs we generate are very large and we want to cut down on the size of it however possible even if it means the file takes a little longer to open while PS regenerates the preview.
3 - How do I enable ZIP compression? It seems to still use RLE even when I set ZIP:
Is this meant to be set on every individual image, or is there some way I'm supposed to tell it that the multilayered PSD as a whole should be compressed?
4 - Can I resize an image but still have the entire untouched image saved in the PSD? I want to resize the images to be smaller, but still leave the option for us to go in Photoshop and resize them back to their full size later on without having lost quality. I'm pretty sure the Transform tool in Photoshop works like this but am not sure if it's possible to do it in IM.
5 - Sometimes we have a PSD where the front layer is entirely black and white but the layers behind them aren't. We want to preserve the color information of those layers in the back, but it seems IM detects that the viewable canvas is all black and white and forces a grayscale colormode on the document. Is there a way to override this?
I've on version 6.9.7-4 Q16 and have tried:
as well as setImageType, setImageColorspace, transformImageColorspace, and any and all variations of these options on the top layer itself vs set on the Imagick object holding the entire PSD before any files are loaded, and none of these seem to work; right now we're changing a single pixel on the top layer to a 1% opacity color, but ideally we don't want to touch the image.
Thank you!!
1 - Every layer I generate seems to have a "Lock transparent pixels" lock set on it. Is there a way to turn that off for some layers? Can I lock other layers entirely?
2 - Is it possible to replace the thumbnail layer with a completely blank layer? The PSDs we generate are very large and we want to cut down on the size of it however possible even if it means the file takes a little longer to open while PS regenerates the preview.
3 - How do I enable ZIP compression? It seems to still use RLE even when I set ZIP:
Code: Select all
$image->setImageFormat('PSD');
$image->setImageCompression(imagick::COMPRESSION_ZIP);
$image->setImageCompressionQuality(80);
4 - Can I resize an image but still have the entire untouched image saved in the PSD? I want to resize the images to be smaller, but still leave the option for us to go in Photoshop and resize them back to their full size later on without having lost quality. I'm pretty sure the Transform tool in Photoshop works like this but am not sure if it's possible to do it in IM.
5 - Sometimes we have a PSD where the front layer is entirely black and white but the layers behind them aren't. We want to preserve the color information of those layers in the back, but it seems IM detects that the viewable canvas is all black and white and forces a grayscale colormode on the document. Is there a way to override this?
I've on version 6.9.7-4 Q16 and have tried:
Code: Select all
$psd->setType(imagick::IMGTYPE_TRUECOLOR);
$psd->setColorspace(imagick::COLORSPACE_SRGB);
$psd->setOption('colorspace:auto-grayscale', 'off');
Thank you!!