-
-
Notifications
You must be signed in to change notification settings - Fork 888
Closed
Labels
Description
Prerequisites
- I have written a descriptive issue title
- I have verified that I am running the latest version of ImageSharp
- I have verified if the problem exist in both
DEBUGandRELEASEmode - I have searched open and closed issues to ensure it has not already been reported
ImageSharp version
2.1.2
Other ImageSharp packages and versions
2.1.3, 3.0.0-alpha.0.11, 3.0.0-alpha.0.21
Environment (Operating system, version and so on)
Windows 10 21H1 x64
.NET Framework version
.Net 6.0
Description
We stumbled on a Jpeg image that gets loaded with wrong colors on all versions after 2.1.1. Tested with 2.1.2, 2.1.3, 3.0.0-alpha.0.11 and 3.0.0-alpha.0.21.
This is very similar to issues #2133, #2141 and #2152. However we don't think it's a duplicate since it's not fixed in either 2.1.3 (like #2133) or 3.0.0-alpha.0.11 (like #2141 / #2152).
Steps to Reproduce
This NUnit test passes on 2.1.1 and fails on all later versions with "Expected: Rgba32(255, 255, 255, 255) But was: Rgba32(255, 128, 128, 255)".
[Test]
public async Task ImageShouldNotBePink()
{
var response = await new HttpClient().GetAsync("https://www.mottafashionplace.com/media/catalog/product/1/0/10085001_11.jpg");
await using var imageStream = await response.Content.ReadAsStreamAsync();
var image = Image.Load<Rgba32>(imageStream);
Assert.That(image[0, 0], Is.EqualTo(new Rgba32(255, 255, 255, 255)));
}
Images
We don't own the problematic image so we can't distribute it. You can download it and use it as a starting point to create another image with the same properties.