月度归档:2022年08月

ImageMagick常用操作-增加水印

convert -fill black -font “宋体-简-粗体” -stroke white -pointsize 200 -gravity north -draw ‘text 0,0 “文字”‘ “原文件.PNG” “marked/新文件.PNG”

Mac下默认是不支持中文的,查看支持哪些字体
convert -list font

#gravity : 组合的图片的位置,取值:
southwest: 左下
southeast: 右下
northwest: 左上
northeast: 右上
south : 底部居中
west : 左侧居中
north: 顶部居中
east: 右侧居中

改尺寸

convert -resize 600×600 src.jpg dst.jpg