2023-11-17 服务器开发-imagemagick-安装与使用

本文介绍了如何在Linux系统中安装和使用ImageMagick工具进行图像处理,包括大小调整、色彩转换、应用色表和使用ImageSequenceOperators执行序列操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

摘要:

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

悟世者

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值