Image Magick 常用功能

畫質壓縮

# 不縮小 
convert DSC_0124.JPG -quality [0..100] img1.jpg

# 縮小 
convert DSC_0124.JPG -scale 20% -size 24% -quality [0..100] img1.jpg

浮水印

https://legacy.imagemagick.org/Usage/annotating/#wmark_text

convert *.jpeg -font Arial -pointsize 20 -draw "gravity south fill black text 0,12 'tokyobaychiba.com' fill white text 1,11 'tokyobaychiba.com' " wmark_text_drawn.jpg

convert *.jpg -font Arial -pointsize 80 -draw "fill-opacity 0.15 text 200,200 tokyobaychiba.com" wmark_text_drawn.jpg
convert photo.jpg -gravity Center -pointsize 16\
 -stroke '#000C' -strokewidth 4 -annotate +5+5 "blog.kueiapp.com"\
 -stroke none    -fill white    -annotate +5+5 "blog.kueiapp.com"\
 output.jpg

Resize

convert <変換前の画像名> -resize (width)x(height) <変換後の画像名>

convert before.jpg -resize 150×150 after.jpg

Comments

タイトルとURLをコピーしました