This project has moved and is read-only. For the latest updates, please go here.

Colorspace conversions

Sep 14, 2015 at 5:10 PM
If I run the following code in it performs a conversion from srgb to adobergb color spaces (source image has no embedded profile). The command line version works ok and does the same thing in both GM 1.3.21-Q16 and IM 6.9.1-Q16.
However in it performs no conversion. I think it only assigns the profiles; the output image has the last profile in sequence embedded.

Also in there's a "img1.RenderingIntent" setting which isn't available in (GM has a command line parameter called "-intent <type>")

Thanks for any suggestion! And thanks for both GM and IM .net projects.
MagickImage img1 = new MagickImage(@"w:\test.jpg");
ColorProfile imp_srgb = new ColorProfile( @"w:\NKsRGB.icm");
ColorProfile imp_adobe = new ColorProfile(@"w:\NKAdobe.icm");
gm convert "w:\test.jpg" -intent Perceptual -profile "w:\NKsRGB.icm" -profile "w:\NKAdobe.icm" "w:\out.jpg"
Sep 15, 2015 at 10:50 AM
Edited Sep 15, 2015 at 10:51 AM
Did this work with previous version of GM.NET? It does look like RenderingIntent is available in Magick++ so I could add this in the next release.
Sep 15, 2015 at 3:25 PM
Thanks for replying!
I've tested now with GraphicsMagick.NET- and it behaves the same. I've also tested using "img1.Strip()" after loading and there's no change.
It would be useful to have a .RenderingIntent in but don't spend time adding it if the GM library doesn't convert between profiles. I could use to do the profile conversions and then move the image to for other things which run faster than in IM.