ImageMagick:使用带有重心的 Convert-composite 分层图像
背景
叠加
composite -gravity center overlay.png background.jpg result1.jpg
结果1.jpg
convert -composite background.jpg overlay.png -gravity center result2.jpg
结果2.jpg
convert -composite background.jpg -gravity center tool_marker.png result3.jpg
result3.jpg
当使用 Convert 作为可执行文件而不是复合文件时,如何获得 result1 的结果?
谢谢!
background
overlay
composite -gravity center overlay.png background.jpg result1.jpg
result1.jpg
convert -composite background.jpg overlay.png -gravity center result2.jpg
result2.jpg
convert -composite background.jpg -gravity center tool_marker.png result3.jpg
result3.jpg
How can I achieve the results from result1 while using convert as the executable rather than composite?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以按照正确的顺序使用运算符开始。那就是首先设置“设置”。
“复合”命令是“读取所有设置然后应用一个操作,命令类型(传统 UNIX)”
“转换”是“按照您所看到的方式执行选项”,可以进行多种操作。 (类似脚本的命令)
请注意,+50+50 是“tool_marker.png”图像左上角的位置。您需要减去该图像中的“固定点”位置才能将其固定点在正确的位置
(如果在使用它的复合操作之前给出),对齐两个图像的中心。
You can start by using the operators in the right order. That is set the 'settings' first.
"Composite" command is 'read all settings then apply ONE operation, type of command (traditional UNIX)
"Convert" is a 'do options as you see them', with MULTIPLE operations possible. (script-like command)
Note the +50+50 is the location of the top-left corner of the 'tool_marker.png" image. You will need to subtract the 'pin-point' location in that image to get it to pin point in the right location.
Gravity Center (if given BEFORE the -composite operation that uses it), aligns the center of BOTH images.