Page 1 of 1

Removing all color data from grayscale png's?

Posted: 2017-06-01T18:03:34-07:00
by i73
When exporting Grayscale pngs (Save to web) It still contains color data, Artists have to be in Grayscale mode in Photoshop in order for them to export actual Grayscale:
Image

I'm wondering if I am able to remove the color data with ImageMagick?

Re: Removing all color data from grayscale png's?

Posted: 2017-06-01T18:06:45-07:00
by i73
I should Litterally do some research on my own...:

Code: Select all

convert D:\myGrayscaleImage.png -set colorspace RGB -colorspace gray D:\myNewGrayscaleImage.png
@Admin you can remove this post.. Sorry guys,

Re: Removing all color data from grayscale png's?

Posted: 2017-09-11T05:46:06-07:00
by Dabrosny
i73 wrote: 2017-06-01T18:06:45-07:00

Code: Select all

convert D:\myGrayscaleImage.png -set colorspace RGB -colorspace gray D:\myNewGrayscaleImage.png
It's not clear to me why you are including -set colorspace RGB, which is normally used when you need to change an incorrect colorspace designation on an image.
If your image is nonlinear (sRGB as most PNGs are) then it should be marked as such already by IM when it is read in. The -colorspace operation is intended to operate on the correct current colorspace, so if you have changed it to something that no longer correctly represents the data, then the resulting grayscale will not be what is normally expected from -colorspace gray.