-
-
Notifications
You must be signed in to change notification settings - Fork 851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File conversion from jpg to webp changes colors of the image #2723
Comments
OK.... This is an interesting issue. The JPEG has a CMYK ICC profile and is encoded using YCCK colors. The fix would be to have #1567 working and convert to RGB using the profile as a guide. When that will ever happen, I simply do not know. I need help there. |
Prerequisites
DEBUG
andRELEASE
modeImageSharp version
3.1.4
Other ImageSharp packages and versions
none
Environment (Operating system, version and so on)
Windows 11
.NET Framework version
6 and 8
Description
In our application we resize and change images from png and jpg to webp for better performance on the website. This works very good most of the times. But for some jpg images there is a distinct color change.
It might be related to #1567 but I am not sure, doesn't happen when just resizing the jpg image.
Steps to Reproduce
using var image = await Image.LoadAsync(file.OpenReadStream());
using var outStream = new MemoryStream();
await image.SaveAsync(outStream, new WebpEncoder());
Jpg image:
webp image looks like this (see webp in zip):
Images
VMware Better Together.zip
The text was updated successfully, but these errors were encountered: