cmyk image with only tones of black color

May 16, 2015 at 12:08 PM
I want to draw rectangles and texts with lib over a cmyk image which has only black color values. I don't want cyan,magenta and yellow color values on final image per black only printing requirement. I tried draw function but could not eliminate cmy values.
I have some results with Composite() and CompositeOperator but i want to do it right away.
Thanks in advance
May 16, 2015 at 3:05 PM
Are you talking about having a grayscale image as the result? You could set the ColorType of the image to Grayscale.
May 16, 2015 at 9:58 PM
Edited May 16, 2015 at 10:01 PM
I was already on grayscale too and it worked. I also wonder if setting c, m and y channels to Quantum.Max with EvaluationOperator would generate same result without changing color type to grayscale. Also should we use Quantum.Max for min color value and 0 for max color value, i.e. c=0 for Color.Cyan constant. Is this usage with Quantum.Max right?
Thanks again
May 17, 2015 at 6:21 AM
You could set the values to zero if you want to keep a CMYK image but I am not sure if that would create the same result. You can also set your image to Grayscale and then back to TrueColor right before you save it to keep a CMYK image as the output.

You are using Quantum.Max incorrectly, 0 = min and Quantum.Max = max for a pixel channel.
May 17, 2015 at 11:20 AM
But when a ColorCMYK is created from a Color.Cyan, its c value is 0, which should be the max value for cyan. I am a little bit confused here.
May 18, 2015 at 10:49 AM
Color.Cyan is a RGB color (#00FFFF). There is no conversion from RGB to CMYK when you assign Color.Cyan to a ColorCMYK. You should use the constructor of ColorCMYK that allows you to specify the values of each channel:
var color = new CMYKColor(Quantum.Max, 0, 0, 0);
May 18, 2015 at 12:25 PM
So, how could i create a cmyk color from named rgb colors(or rgb color strings formatted by #) easily.
May 18, 2015 at 7:27 PM
The named colors only work with RGB colors.