开发者

image magick center on canvas and color

开发者 https://www.devze.com 2023-04-07 16:46 出处:网络
I am running a script to crop an image,, set the correct dpi and resize it slightly smaller.. this first command works perfectly

I am running a script to crop an image,, set the correct dpi and resize it slightly smaller.. this first command works perfectly

convert tmp_image/o_1316646627.jpg -strip -crop 1676.404494382x1200+0+0 -quality 100 -units pixelsperinch -density 239.48635634029 -resample 239.48635634029x239.4863开发者_如何学Python5634029 -resize 1556.6613162119x tmp_image/p_1316646627.jpg

this second command places the image on a sligntly larger canvas, and is supposed to change the background color and center the image on the canvas. it creates the canvas correctly, but the image is placed in the top left corner and the background color is black

convert tmp_image/p_1316646627.jpg -background '#460712' -gravity center -extent 1676.404494382x1200 tmp_image/p_1316646627.jpg

ive been stuck here for hours.. any ideas would be greatly appreciated! thanks

0

精彩评论

暂无评论...
验证码 换一张
取 消