ImageMagick命令几何体不起作用 [英] Imagemagick command geometry not working

查看:81
本文介绍了ImageMagick命令几何体不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆