日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

用imageMagick的composite合并图片

發布時間:2023/12/9 编程问答 34 豆豆
生活随笔 收集整理的這篇文章主要介紹了 用imageMagick的composite合并图片 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

composite命令可以非常方便的合并兩張圖片

因此用來進行圖像加水印、批量增加邊框等常用的變換

?

最簡單的用法為:

?

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

?

其中src.jpg為前景圖片

coverback.jpg為背景圖片。

des.jpg為疊加后的結果

?

-gravity north 指疊加位置為垂直據頂部、水平居中(正北方向)

如果要求在正中間,參數為center

如果要求在右下角,參數為southeast

?

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

?

具體的composite參數表見下表

?

?

-affine?matrix

affine transform matrix
-alphaon, activate, off, deactivate, set, opaque, copy", transparent, extract, background, or shape the alpha channel
-authenticate?valuedecrypt image with this password
-blend?geometryblend images
-blue-primary?pointchromaticity blue primary point
-border?geometrysurround image with a border of color
-bordercolor?colorborder color
-channel?typeapply option to select image channels
-colors?valuepreferred number of colors in the image
-colorspace?typeset image colorspace
-comment?stringannotate image with comment
-compose?operatorset image composite operator
-compress?typeimage compression type
-debug?eventsdisplay copious debugging information
-decipher?filenameconvert cipher pixels to plain
-define?format:optiondefine one or more image format options
-density?geometryhorizontal and vertical density of the image
-depth?valueimage depth
-displace?geometryshift image pixels defined by a displacement map
-dissolve?valuedissolve the two images a given percent
-dither?methodapply error diffusion to image
-encipher?filenameconvert plain pixels to cipher pixels
-encoding?typetext encoding type
-endian?typeendianness (MSB or LSB) of the image
-extract?geometryextract area from image
-filter?typeuse this filter when resizing an image
-font?namerender text with this font
-geometry?geometrypreferred size or location of the image
-gravity?typehorizontal and vertical text placement
-green-primary?pointchromaticity green primary point
-helpprint program options
-identifyidentify the format and characteristics of the image
-interlace?typetype of image interlacing scheme
-interpolate?methodpixel color interpolation method
-label?stringassign a label to an image
-level?valueadjust the level of image contrast
-limit?type valuepixel cache resource limit
-log?formatformat of debugging information
-monitormonitor progress
-monochrometransform image to black and white
-negatereplace each pixel with its complementary color
-page?geometrysize and location of an image canvas (setting)
-pointsize?valuefont point size
-profile?filenameadd, delete, or apply an image profile
-quality?valueJPEG/MIFF/PNG compression level
-quantize?colorspacereduce image colors in this colorspace
-quietsuppress all warning messages
-red-primary?pointchromaticity red primary point
-regard-warningspay attention to warning messages.
-respect-parenthesessettings remain in effect until parenthesis boundary.
-rotate?degreesapply Paeth rotation to the image
-sampling-factorgeometryhorizontal and vertical sampling factor
-scene?valueimage scene number
-seed?valueseed a new sequence of pseudo-random numbers
-set?attribute valueset an image attribute
-sharpen?geometrysharpen the image
-shave?geometryshave pixels from the image edges
-size?geometrywidth and height of image
-stegano?offsethide watermark within an image
-stereo?geometrycombine two image to create a stereo anaglyph
-stripstrip image of all profiles and comments
-swap?indexesswap two images in the image sequence
-synchronizesynchronize image to storage device
-taintmark the image as modified
-thumbnail?geometrycreate a thumbnail of the image
-tilerepeat composite operation across and down image
-transformaffine transform image
-transparent-colorcolortransparent color
-treedepth?valuecolor tree depth
-type?typeimage type
-units?typethe units of image resolution
-unsharp?geometrysharpen the image
-verboseprint detailed information about the image
-versionprint version information
-virtual-pixel?methodaccess method for pixels outside the boundaries of the image
-watermarkgeometrypercent brightness and saturation of a watermark
-white-point?pointchromaticity white point
-white-thresholdvalueforce all pixels above the threshold into white
-write?filenamewrite images to this file
本文轉自博客園知識天地的博客,原文鏈接:用imageMagick的composite合并圖片,如需轉載請自行聯系原博主。

總結

以上是生活随笔為你收集整理的用imageMagick的composite合并图片的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。