-
-
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
webp (from jpeg) gives inaccurate colors #2107
Comments
Wrong repository. I’ll transfer it for you |
Can you provide an image? It's almost impossible to determine errors just from before/after comparison. |
Converting to bmp and tga also has this incorrect color, while tiff seems to be ok. I think this can have something todo with the embedded color profile. |
Yep, checked with JPEGsnoop - this image has color profile. @marklonquist unfortunately, this is yet to be done in #1567. |
Thanks for the info. |
There is something we can do actually: Currently we are not preserving the ICCP when encoding webp and bmp. We can at least change that. |
That's awesome - any idea if there will be a 2.1.2 update where this might be in, or is this gonna be part of 3.0.0? 😄 Awesome work you guys are doing! |
Thanks! 3.0.0 I’m afraid. Only super critical security issues will be back ported to 2x now. It’s too much effort to maintain multiple majors. |
Wait V2 has only just come out and its already going to end up with rather critical bugs in it like this that basically render the use of webp pointless? This is a bit of a shame as Umbraco has just in V10 which is about to be released upgraded to V2 of ImageSharp & now its going to have a defective webp implementation all the way until V3 comes out presumably? Apologies if I am being daft & missing something! |
It’s not a critical bug. Color profiles are optional. We don’t want to support legacy target frameworks. It’s a ton of work that we don’t get paid to do nor are obligated in any way to do. |
You can backport it to v2.0 if you need/want to. |
So what needs to be done to fix the bug in ImageSharp that means its not generating the webp image correctly, an example case as attached: The webp file in there, is generated at a width of 1500px from a webp file as the source by ImageSharp. Hopefully that makes sense, based on this and the test case, is this a configuration issue of some sort that can be resolved or some way to fix it if its a bug in ImageSharp's generation of the image as having a media gallery site running on Umbraco powered by this & this outcome is a bit concerning 🙈 |
Just to put a note here in case it helps anyone else, albeit not an ideal solution, in the mean time it seems that V3 does not suffer this issue, for any Umbraco users, if you upgrade your own project to the pre-release V3 of ImageSharp while still using ImageSharp.Web 2, the site will work fine and load but without this bug happening, hope that helps someone out! 👌 |
That is not a wise solution. There is guaranteed breaking changes to V3 including license changes. You can follow PRs linked to this issue to see required changes. If you want to put the effort in, we’ll accept that, otherwise this is just unhelpful noise. |
Just out of curiosity; what kind of license changes? Anything us business users need to be aware of? |
Nothing. Because business users should be buying commercial licenses |
Fixed in v3 alpha |
Prerequisites
DEBUG
andRELEASE
modeImageSharp.Web version
2.0.0
Other Six Labors packages and versions
ImageSharp 2.1.1
Environment (Operating system, version and so on)
Linux container in GCP running on Kubernetes
.NET Framework version
NET6
Description
Colors are inaccurate when setting format to webp from a jpeg original.
Steps to Reproduce
Set
format=webp
on a jpeg original in a side-by-side comparison and observe the inaccurate colorsImages
Left side: WebP - Right side: Original JPEG
The text was updated successfully, but these errors were encountered: