Convert From TIF to JPG - Colors Washed Out In Chrome and Firefox on Mac Only
Posted: 2016-10-03T11:43:09-07:00
I use Magick.NET x86 7.0. I open a TIF (created in Photoshop with LZW compression) with Magick, and with no MagickSettings. I resize to a height of 640. I add ICC profile. I add SRGB ColorProfile. I set ColorSpace to sRGB. I save file as .JPG.
But this image looks washed out in Chrome and Firefox on Mac only. I know that this is due to color management within the two browsers. I’m trying to get the images to work correctly and consistently across all browsers. I’ve gotten it to work with an image created by Photoshop, but not one yet works by Magick.NET. I’ve tried many different settings and ICC profiles, but still no luck yet.
Here’s the code snippet:
MagickImage image = new MagickImage(File.ReadAllBytes("0001161697.tif"));
image.Resize(0, 640);
image.RemoveProfile("8BIM"); // need to use this RemoveProfile() command to remove Photoshop's 8BIM profile which it uses to determine the DPI instead of the standard JPEG resolution settings that were modified.
image.AddProfile(new ColorProfile("sRGB_IEC61966-2-1_black_scaled.icc"));
image.ColorSpace = ColorSpace.sRGB;
image.Density = new Density(96);
image.RenderingIntent = RenderingIntent.Perceptual;
image.Quality = 85;
image.Write("0001161697.jpg");
I can send you the original 0001161697.tif file, ICC profile, image generated by code above (does not work), and image created by Photoshop (does work).
Let me know if you need this and more info.
But this image looks washed out in Chrome and Firefox on Mac only. I know that this is due to color management within the two browsers. I’m trying to get the images to work correctly and consistently across all browsers. I’ve gotten it to work with an image created by Photoshop, but not one yet works by Magick.NET. I’ve tried many different settings and ICC profiles, but still no luck yet.
Here’s the code snippet:
MagickImage image = new MagickImage(File.ReadAllBytes("0001161697.tif"));
image.Resize(0, 640);
image.RemoveProfile("8BIM"); // need to use this RemoveProfile() command to remove Photoshop's 8BIM profile which it uses to determine the DPI instead of the standard JPEG resolution settings that were modified.
image.AddProfile(new ColorProfile("sRGB_IEC61966-2-1_black_scaled.icc"));
image.ColorSpace = ColorSpace.sRGB;
image.Density = new Density(96);
image.RenderingIntent = RenderingIntent.Perceptual;
image.Quality = 85;
image.Write("0001161697.jpg");
I can send you the original 0001161697.tif file, ICC profile, image generated by code above (does not work), and image created by Photoshop (does work).
Let me know if you need this and more info.