Convert RGB to Grayscale in ImageMagick command-line

前端 未结 7 1073
孤街浪徒
孤街浪徒 2020-12-23 16:16

How do I convert a RGB image (3 channels) to a grayscale one, using the (r+g+b)/3 method? I look through an examples page: http://www.imagemagick.org/Usage/color_mods/#grays

7条回答
  •  渐次进展
    2020-12-23 16:47

    To batch convert images in Fish shell:

    for file in *.jpg; convert -colorspace Gray $file $file; end;

提交回复
热议问题