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.AddProfile(ColorProfile.SRGB);
                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 http://regex.info/exif.cgi 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

Ryan
Coordinator
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.

Edit:
I updated the documentation, you should use the following code:
using (MagickImage image = new MagickImage(sourceImagePath))
{
  image.AddProfile(ColorProfile.SRGB);
  image.ColorSpace = ColorSpace.sRGB;
  image.Write(destinationImagePath);
}
Tested with this image: http://en.wikipedia.org/wiki/File:Channel_digital_image_CMYK_color.jpg
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.