convert PSDtoJPG: canvas size or layer size

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
yosaku

convert PSDtoJPG: canvas size or layer size

Post by yosaku »

Hello

i am using ImageMagick command line tool to convert PSD images to JPG format.
Recently i had a case where the resulting image has a different image size.
PSD file is 865x1297, and result JPG file is 876x1416.

here is a link to the input psd file:
http://www.yaramaika.net/images/cut/input.psd
and the output file:
http://www.yaramaika.net/images/cut/output.jpg

i am using ImageMagick 5.5.6 04/01/03 Q16
and the command i run is:
convert input.psd JPG:output.jpg

After inspecting the pdf file, i noticed that the image is not completely flattened, although there is only a unique Layer.
If i flatten the image in Photoshop, then the conversion works fine.
One more thing, the layer size is bigger than the canvas size, and the size of the jpg image created by imageMagick is the size of the layer, not the size of the canvas.
I hope my explanation is not too confusing..
I would like to use the image canvas size and not the layer size.
So i guess i need to tell convert to crop the image to the canvas size.
i have seen the crop option or the repage option, but i am not really familiar with these and i am not sure what i should use.
I also tried to use the -flatten or -layers flatten option in order to flatten the image before processing but the result is same.
Any help would be appreciated.

Regards
Post Reply