图像magick覆盖图像 [英] Image magick overlaying images

查看:161
本文介绍了图像magick覆盖图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个图像,一个是叠加,让我们说图像A有透明度,另一个图像B,我必须将叠加图像A放在图像B上,这样通过透明部分可以看到图像B的某些部分对于图像A,我还必须根据一些参数移动图像B,如何用图像魔法来实现这一点

I have two images, one is the overlay, lets say Image A with transparency, and another image B, I have to place the overlay image A over image B, so that some part of image B is visible through the transparent part of image A, I also have to move the image B according to some parameters, How can I achieve this with image magick

推荐答案

我能够通过以下命令实现它

I was able to achieve it by the following command

composite -compose Dst_Over -geometry 520x320+20+80 image.jpeg overlay.png final.png

此处的关键 -compose Dst_Over ,将图像置于背景下( overlay.png ),几何选项可让您移动图像。

the key here -compose Dst_Over, which puts the image under the background (overlay.png) and the geometry options let you move the image.

这篇关于图像magick覆盖图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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