How can I convert an image to grayscale via the command line? [closed]

If you have imagemagick installed, convert source.jpg -colorspace Gray destination.jpg (true grayscale only) convert source.jpg -monochrome destination.jpg (true black and white) convert source.jpg -separate destination.jpg (separate into gray channels) If you don’t care about losing the original file: mogrify -colorspace Gray file.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)