imagemagick 图片叠加-compose模式详解
程序员文章站
2022-07-13 14:10:18
...
imagemagick 图片叠加-compose模式详解
命令格式
convert dst.png -compose [模式] src.png -composite out.png
convert dst.png -compose [模式] src.png +swap -composite out.png
相当于
convert src.png -compose [模式] dst.png -composite out.png
Use +swap to switch the last two images in the sequence.
+swap 为交换图片叠加次序
- 查看叠加模式
convert -list compose
- Atop
- Blend
- Blur
- Bumpmap
- ChangeMask
- Clear
- ColorBurn
- ColorDodge
- Colorize
- CopyAlpha
- CopyBlack
- CopyBlue
- CopyCyan
- CopyGreen
- Copy
- CopyMagenta
- CopyRed
- CopyYellow
- Darken
- DarkenIntensity
- DivideDst
- DivideSrc
- Dst
- Difference
- Displace
- Dissolve
- Distort
- DstAtop
- DstIn
- DstOut
- DstOver
- Exclusion
- HardLight
- HardMix
- Hue
- In
- Intensity
- Lighten
- LightenIntensity
- LinearBurn
- LinearDodge
- LinearLight
- Luminize
- Mathematics
- MinusDst
- MinusSrc
- Modulate
- ModulusAdd
- ModulusSubtract
- Multiply
- None
- Out
- Overlay
- Over
- PegtopLight
- PinLight
- Plus
- Replace
- Saturate
- Screen
- SoftLight
- Src
- SrcAtop
- SrcIn
- SrcOut
- SrcOver
- VividLight
- Xor
convert dst.png -compose [模式] src.png -composite out.png