ImageMagick命令几何体不起作用 [英] Imagemagick command geometry not working
问题描述
我的image1.jpg大小为350x500,另一个image2.png(350x150)具有渐变效果,例如阴影.我需要将阴影应用于其底部的image1.jpg.但是几何形状对我不起作用.
I am having image1.jpg with the size of 350x500 and another image2.png ( 350x150 ) with gradient effects like shadow. I need to apply the shadow to image1.jpg in its bottom. But geometry doesn't work for me.
convert -extent 600x700\! image1.jpg \( image2.png -geometry +0+500 \) -composite final.png
我希望几何图形将图像定位在给定的位置上.如果我是对的,则几何图形对我不起作用.
I hope the geometry will position an image at the point I have given, If I am right, geometry is not working for me.
推荐答案
不确定您要实现的目标,但此目标是否结束:
Not certain what you are trying to achieve, but is this close:
convert xc:red[350x500] -extent 600x700\! xc:blue[350x150] -geometry +80+300 -composite result.png
也许您的PNG文件中有一些剩余的分页信息,您可以通过在加载后立即添加+repage
来将其删除:
Maybe you have some left-over paging info in your PNG file, you can remove it by adding +repage
immediately after loading it:
convert ... ... image.png +repage ...
您可以这样识别它:
这篇关于ImageMagick命令几何体不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!