Closed d2phap closed 7 years ago
I am not sure if what you are seeing in your example file are the correct colors. I get the same "incorrect color" with just the following command:
using (Bitmap image = new Bitmap("ffbdd072-e0b8-11e6-9693-e5dd40721972.jpg", true))
{
image.Save("test.png", ImageFormat.Png);
}
It does depend where I view it though. In the PhotoViewer of Win10 I get the "correct color" but Chrome shows the "incorrect color". I can however get the result that you want in both apps with the following code:
using (MagickImage image = new MagickImage("ffbdd072-e0b8-11e6-9693-e5dd40721972.jpg"))
{
image.AddProfile(ColorProfile.SRGB);
using (var bitmap = image.ToBitmap())
{
bitmap.Save("test.png");
}
}
Thanks, this helped!
Thanks for the very useful lib.
How to apply automatically embedded color profile of an image? I have an image, when I use:
the color of image displayed incorrectly:
Before that, using .NET Bitmap, I can write:
bmp = new Bitmap(path, true);
This is my sample file:
Thank you