Currently in my conversion I am using the below profile based on color mode
RGB to CMYK (when the input image also doesnt have any color profile)
convert -alpha off -units pixelsperinch 300 Test_RGB_2901_1.jpg[0] -profile "sRGB Color Space Profile" -profile USWebCoatedSWOP.icc Test_CMYK_2901_1.jpg
Default RGB Color Profile - sRGB Color Space Profile.icm
Default CMYK Color Profile - USWebCoatedSWOP.icc
Default Gray Color Profile - ??
For RGB or CMYK converstion to Gray instead of color mode I want to use a color profile as I mentioned above in RGB to CYMK conversion
Does Gray color has a ICC color profile that I can use ?
Color profile for Gray images
-
- Posts: 11
- Joined: 2015-06-02T05:04:29-07:00
- Authentication code: 6789
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Color profile for Gray images
Any color profile can be used with grayscale images. Does that answer the question?
snibgo's IM pages: im.snibgo.com
-
- Posts: 11
- Joined: 2015-06-02T05:04:29-07:00
- Authentication code: 6789
Re: Color profile for Gray images
Let me rephrase my questionsnibgo wrote:Any color profile can be used with grayscale images. Does that answer the question?
convert -alpha off -units pixelsperinch 300 Test_RGB_2901_1.jpg[0] -profile "sRGB Color Space Profile" -profile <GrayProfile??> Test_Gray_2901_1.jpg
So which color profile I can use to convert my rgb image to gray instead of using -colorspace I want to use -profile
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Color profile for Gray images
I haven't seen color profiles that will convert to CMYK grayscale. I have seen profiles that will convert to sRGB grayscale, so you could convert via one of these and then to CMYK.
Or you could use one of the many other methods to convert to sRGB grayscale, then convert the profile to CMYK.
Or you could use one of the many other methods to convert to sRGB grayscale, then convert the profile to CMYK.
snibgo's IM pages: im.snibgo.com
-
- Posts: 11
- Joined: 2015-06-02T05:04:29-07:00
- Authentication code: 6789
Re: Color profile for Gray images
Let me try rephrasing my question...snibgo wrote:I haven't seen color profiles that will convert to CMYK grayscale. I have seen profiles that will convert to sRGB grayscale, so you could convert via one of these and then to CMYK.
Or you could use one of the many other methods to convert to sRGB grayscale, then convert the profile to CMYK.
Requirement is to convert a file from RGB to GRAY
Input file Name - Test_2901_1.jpg (It can be RGB or CMYK image)
Output file Name - Test_Gray_2901_1.jpg (output should be GRAY)
The below command works
convert Test_2901_1.jpg[0] -colorspace GRAY Test_Gray_2901_1.jpg
But is there a way to use -profile instead of -colorspace to get the desired GRAY output image
convert Test_2901_1.jpg[0] -profile <GrayProfile?> Test_Gray_2901_1.jpg
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Color profile for Gray images
If you want the image to be sRGB grayscale, yes, you can use a profile that will convert to sRGB grayscale. I have seen these around, but I don't have any links. Sorry.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Color profile for Gray images
Two are at https://github.com/erdc-cm/jasper/tree/ ... orprofiles (gray and sgray).
see also viewtopic.php?t=16699&start=30#p117767
see also viewtopic.php?t=16699&start=30#p117767