This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

CMYK confusion (it just doesn't look right...)

First off, I am brand new GrahphicsMill and new to the print world... a programmer forced into creating print ready files...

Essentially this is what I am doing.. I am opening an existing CMYK TIFF, adding a rectangle filled with a CMYK colour (which I sampled earlier in photoshop from the same file i just opened in code) and saving it out as a new file... It just doesn't work (ignore the lines on the left side): Click here to download image


bitmap = new Aurigma.GraphicsMill.Bitmap(System.IO.Path.Combine(new string[] { basePath, "assets", "blah.tif" }));

Directory.CreateDirectory("output");

using (var graphics = bitmap.GetAdvancedGraphics())
{
    graphics.FillRectangle(new SolidBrush(new CmykColor(12, 95, 84, 2)), new System.Drawing.Rectangle(bitmap.Width / 2, 0, bitmap.Width, bitmap.Height));
    bitmap.Save(@"output\out.tiff", new Aurigma.GraphicsMill.Codecs.TiffSettings { Compression = Aurigma.GraphicsMill.Codecs.CompressionType.None });
}                  


I am sure this is easy for someone that knows Photoshop + CMYK... but for a lowly dev like myself this is greek...

If more info or sample files are needed, please let me know... Any help would be greatly appreciated...
Could you send us the blah.tif file? It should help us to understand the issue better.
... it was my issue ...

I was directly putting the CMYK PERCENTAGE values from the Photoshop colour picker instead of translating those to a bit. After the conversion, everything seems to work:

so after some math...

255 * .12 = 30.6
255 * .95 = 242.25
255 * .84 = 214.2
255 * .02 = 5.1


... this

new CmykColor(12, 95, 84, 2)


... becomes

new CmykColor(31, 242, 214, 5)


This spawns a decent question though, is there a built in way to handle this conversion?
nokturnal
This spawns a decent question though, is there a built in way to handle this conversion


There is no a built-in method for this conversion, so you need to implement your own function.

We will consider to implement it in the further releases (Aurigma Bug #0021960).