摘要:
2023-11-17 事业-代号s-imagemagick-安装与使用
文档:
Color Modifications -- ImageMagick Examples
安装:
yum install -y ImageMagick
使用:
convert -size 100x100 plasma:fractal -virtual-pixel edge -blur 0x5 \
-shade 140x45 -normalize \
-size 1x100 xc:black -size 9x100 gradient: \
+append pic.jpg
convert -size 100x100 gradient:navy-snow e.png
convert pic.png e.png -clut a.png
查看色表:
[root@localhost pic]# pngcheck -vv e.png
File: e.png (734 bytes)
chunk IHDR at offset 0x0000c, length 13
100 x 100 image, 48-bit RGB, non-interlaced
chunk cHRM at offset 0x00025, length 32
White x = 0.3127 y = 0.329, Red x = 0.64 y = 0.33
Green x = 0.3 y = 0.6, Blue x = 0.15 y = 0.06
chunk bKGD at offset 0x00051, length 6
red = 0xffff, green = 0xffff, blue = 0xffff
chunk tIME at offset 0x00063, length 7: 17 Nov 2023 03:20:16 UTC
chunk IDAT at offset 0x00076, length 596
zlib: deflated, 32K window, maximum compression
row filters (0 none, 1 sub, 2 up, 3 avg, 4 paeth):
1 4 1 4 4 4 4 1 4 4 4 4 4 4 4 1 4 4 4 1 4 4 4 4 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
1 4 4 4 4 4 4 1 4 1 4 1 1 4 4 1 1 1 4 1 1 1 1 4 1
(100 out of 100)
chunk IEND at offset 0x002d6, length 0
No errors detected in e.png (6 chunks, 98.8% compression).
说明:
Image Sequence Operators:
-append append an image sequence
-clut apply a color lookup table to the image
-coalesce merge a sequence of images
-combine combine a sequence of images
-compare mathematically and visually annotate the difference between an image and its reconstruction
-complex operator perform complex mathematics on an image sequence
-composite composite image
-copy geometry offset
copy pixels from one area of an image to another
-crop geometry cut out a rectangular region of the image
-deconstruct break down an image sequence into constituent parts
-evaluate-sequence operator
evaluate an arithmetic, relational, or logical expression
-flatten flatten a sequence of images
-fx expression apply mathematical expression to an image channel(s)
-hald-clut apply a Hald color lookup table to the image
-layers method optimize, merge, or compare image layers
-morph value morph an image sequence
-mosaic create a mosaic from an image sequence
-poly terms build a polynomial from the image sequence and the corresponding
terms (coefficients and degree pairs).
-print string interpret string and print to console
-process arguments process the image with a custom image filter
-separate separate an image channel into a grayscale image
-smush geometry smush an image sequence together
-write filename write images to this file