博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
用imageMagick的composite合并图片
阅读量:2491 次
发布时间:2019-05-11

本文共 2943 字,大约阅读时间需要 9 分钟。

composite命令可以非常方便的合并两张图片

因此用来进行图像加水印、批量增加边框等常用的变换

 

最简单的用法为:

composite -gravity north src.jpg coverback.jpg des.jpg

 

其中src.jpg为前景图片

coverback.jpg为背景图片。

des.jpg为叠加后的结果

 

-gravity north 指叠加位置为垂直据顶部、水平居中(正北方向)

如果要求在正中间,参数为center

如果要求在右下角,参数为southeast

 

composite还提供更灵活的定位,可以使用 -geometry 配置

 

具体的composite参数表见下表

 

 

affine transform matrix
on, activate, off, deactivate, set, opaque, copy", transparent, extract, background, or shape the alpha channel
decrypt image with this password
blend images
chromaticity blue primary point
surround image with a border of color
border color
apply option to select image channels
preferred number of colors in the image
set image colorspace
annotate image with comment
set image composite operator
image compression type
display copious debugging information
convert cipher pixels to plain
define one or more image format options
horizontal and vertical density of the image
image depth
shift image pixels defined by a displacement map
dissolve the two images a given percent
apply error diffusion to image
convert plain pixels to cipher pixels
text encoding type
endianness (MSB or LSB) of the image
extract area from image
use this filter when resizing an image
render text with this font
preferred size or location of the image
horizontal and vertical text placement
chromaticity green primary point
print program options
identify the format and characteristics of the image
type of image interlacing scheme
pixel color interpolation method
assign a label to an image
adjust the level of image contrast
pixel cache resource limit
format of debugging information
monitor progress
transform image to black and white
replace each pixel with its complementary color
size and location of an image canvas (setting)
font point size
add, delete, or apply an image profile
JPEG/MIFF/PNG compression level
reduce image colors in this colorspace
suppress all warning messages
chromaticity red primary point
pay attention to warning messages.
settings remain in effect until parenthesis boundary.
apply Paeth rotation to the image
horizontal and vertical sampling factor
image scene number
seed a new sequence of pseudo-random numbers
set an image attribute
sharpen the image
shave pixels from the image edges
width and height of image
hide watermark within an image
combine two image to create a stereo anaglyph
strip image of all profiles and comments
swap two images in the image sequence
synchronize image to storage device
mark the image as modified
create a thumbnail of the image
repeat composite operation across and down image
affine transform image
transparent color
color tree depth
image type
the units of image resolution
sharpen the image
print detailed information about the image
print version information
access method for pixels outside the boundaries of the image
percent brightness and saturation of a watermark
chromaticity white point
force all pixels above the threshold into white
write images to this file

转载地址:http://hjmrb.baihongyu.com/

你可能感兴趣的文章
Mysql出现Table 'performance_schema.session_status' doesn't exist
查看>>
MySQL innert join、left join、right join等理解
查看>>
vivado模块封装ip/edf
查看>>
sdc时序约束
查看>>
Xilinx Jtag Access/svf文件/BSCANE2
查看>>
NoC片上网络
查看>>
开源SoC整理
查看>>
【2020-3-21】Mac安装Homebrew慢,解决办法
查看>>
influxdb 命令行输出时间为 yyyy-MM-dd HH:mm:ss(年月日时分秒)的方法
查看>>
已知子网掩码,确定ip地址范围
查看>>
判断时间或者数字是否连续
查看>>
docker-daemon.json各配置详解
查看>>
Docker(一)使用阿里云容器镜像服务
查看>>
Docker(三) 构建镜像
查看>>
Spring 全家桶注解一览
查看>>
JDK1.8-Stream API使用
查看>>
cant connect to local MySQL server through socket /tmp/mysql.sock (2)
查看>>
vue中的状态管理 vuex store
查看>>
Maven之阿里云镜像仓库配置
查看>>
Maven:mirror和repository 区别
查看>>