This project has moved. For the latest updates, please go here.

CMYK jpeg to RGB jpeg, leaving image as CMYK.

Jan 13, 2014 at 4:17 PM
I've tried the sample for converting from CMYK to RGB and the output still appears to have CMYK embedded.
            var settings = new MagickReadSettings();
            settings.ColorSpace = ColorSpace.RGB;

            using (MagickImage image = new MagickImage())
                image.Read(sourceImagePath , settings);
                image.Write(destinationImagePath );
I've also tried swapping the ColorSpace enumeration above with .CMYK to no avail.

After running the code above and using to read the metadata, I can see the following warning;
WARNING: Embedded color profile: “(unrecognized embedded color profile 'U.S. Web Coated (SWOP) v2')”
Some popular web browsers ignore embedded color profiles, meaning users of those browsers see the wrong colors for this image.
Obviously, this is exactly what I am trying to get rid of as it renders poorly in IE and other image libs have trouble understanding it (as it is CMYK).

Am I doing something dumb? Tried a few different angles but can't see it.

Thanks in advance

Jan 13, 2014 at 4:57 PM
Edited Jan 13, 2014 at 6:58 PM
Can you add a link to your image? If you don't want to publicly share your image feel free to contact me through CodePlex.

I updated the documentation, you should use the following code:
using (MagickImage image = new MagickImage(sourceImagePath))
  image.ColorSpace = ColorSpace.sRGB;
Tested with this image:
Jan 14, 2014 at 9:17 AM
That works, but the palette goes very grey. I'll send you an image if that's OK of the before and after.