Bug extracting images from PSD with negative top in v6.9.2
Posted: 2015-10-06T19:12:50-07:00
Hi There,
I use ImageMagick to create PSD files with images in multiple layers, open Photoshop, edit those PSD files (essentially align various layers) save it, and then extract and flatten the PSD file into a JPG. This works well in v6.9.0, but in v6.9.2 there's a bug.
Usually the toplayer in my PSD is a template and that layer is locked. The second layer is an image which needs to be aligned beneath an opening in the top layer. Think of a frame over a photo, where I position the photo under the frame.
Images aren't necessarily the same size, and can be portrait and landscape.
The script I use to flatten the PSD into a JPG uses the size of the template image to determine the crop factor. Ie, if I have a 1024x768 template and a 1400x3000 image, the end JPG will be of a size 1024x768.
The problem I encountered in v6.9.2 is that if the image is positioned so that the top of the image goes into a negative area above the template (ie I move the image upwards under the template to position it correctly, so that effectively the image has a negative top) I get a "pixel cache allocation failed" error from convert.
I eventually figured out that IM v6.9.2 for some reason translates this negative top border in the PSD file to a massive resolution. Something like 1400x32487287873253854 (not kidding). IM v 6.9.0 handles it correctly, so for the moment I've gone back to that.
Identify from IM v6.9.2 will also show this problem, whereas identify from IM v6.9.0 works correctly.
Cheers!
I use ImageMagick to create PSD files with images in multiple layers, open Photoshop, edit those PSD files (essentially align various layers) save it, and then extract and flatten the PSD file into a JPG. This works well in v6.9.0, but in v6.9.2 there's a bug.
Usually the toplayer in my PSD is a template and that layer is locked. The second layer is an image which needs to be aligned beneath an opening in the top layer. Think of a frame over a photo, where I position the photo under the frame.
Images aren't necessarily the same size, and can be portrait and landscape.
The script I use to flatten the PSD into a JPG uses the size of the template image to determine the crop factor. Ie, if I have a 1024x768 template and a 1400x3000 image, the end JPG will be of a size 1024x768.
The problem I encountered in v6.9.2 is that if the image is positioned so that the top of the image goes into a negative area above the template (ie I move the image upwards under the template to position it correctly, so that effectively the image has a negative top) I get a "pixel cache allocation failed" error from convert.
I eventually figured out that IM v6.9.2 for some reason translates this negative top border in the PSD file to a massive resolution. Something like 1400x32487287873253854 (not kidding). IM v 6.9.0 handles it correctly, so for the moment I've gone back to that.
Identify from IM v6.9.2 will also show this problem, whereas identify from IM v6.9.0 works correctly.
Cheers!