I need to downscale the following image:
magick input.png -resize 64x64> output.png
The image is just a regular screenshot. It wasn’t created as a grayscale one. When I try to downscale it using the command above, ImageMagick shows me a warning:
magick: profile ‘icc’: ‘RGB ‘: RGB color space not permitted on grayscale PNG
Some people suggest to enforce PNG24 in such cases (or PNG32, if the image has transparency):
magick input.png -resize 64x64> PNG24:output.png
But I’m not sure I like this approach: it looks more a workaround, not a true solution to me, because what if I prefer to not convert my image to PNG24 or PNG32, and simply preserve its original color type?
Also, I have a found a suggestion to add -define colorspace:auto-grayscale=false
, but neither
magick input.png -resize 64x64> -define colorspace:auto-grayscale=false output.png
nor
magick -define colorspace:auto-grayscale=false input.png -resize 64x64> output.png
prevent the RGB color space not permitted on grayscale PNG warning to appear. What is the proper way to get rid of it? (I don’t mean to simply suppress it with -quiet
, of course.)