imageMagick.md

ImageMagick

ImageMagick is a free and open-source[4] cross-platform software suite for displaying, creating, converting, modifying, and editing raster images. Created in 1987 by John Cristy, it can read and write over 200 image file formats. It and its components are widely used in open-source applications.

ImageMagick是开源软件,用来对图片进行修改。

convert

图片压缩

  1. 直接缩小即可

    convert -resize image.png rezise.png
  2. 网上大多-quatify进行质量压缩,但是实验无效

  3. 图片压缩,发现webp格式很不错,质量好而且压缩率高

    convert image.png image.webp

文字注释

# -font - 指定字体文件路径
# -undercolor - 指定字体区域背景色
# -fill - 指定字体颜色
# -pointsize - 字体大小
# -draw - 要绘制的文本
# input.jpg - 原图
# ouput.jpg - 输出图片
###
TEXT="Some Text"
convert -font helvetica -undercolor Black -fill blue -pointsize 36 \
-draw "text 15,50 '$TEXT'" \
input.jpg ouput.jpg
convert image.png -draw "text 0,20 'some text'" newimage.png

本文作者:nsfoxer

本文链接:https://www.cnblogs.com/nsfoxer/p/16321414.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   nsfoxer  阅读(24)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起