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

Colorspace conversions

Sep 14, 2015 at 5:10 PM
Hi
If I run the following code in IM.net 7.0.0.0017 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 GM.net 1.3.21.2-Q16 it performs no conversion. I think it only assigns the profiles; the output image has the last profile in sequence embedded.

Also in IM.net there's a "img1.RenderingIntent" setting which isn't available in GM.net (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");
img1.AddProfile(imp_srgb);
img1.AddProfile(imp_adobe);
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-1.3.19.1-Q16 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 GM.net but don't spend time adding it if the GM library doesn't convert between profiles. I could use IM.net to do the profile conversions and then move the image to GM.net for other things which run faster than in IM.