-
Notifications
You must be signed in to change notification settings - Fork 546
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
[BUG] Linear PNG colors too dark in dev/update-skia in most image viewers #1238
Comments
This is interesting... I'll investigate. But this might also be a question for https://groups.google.com/forum/#!forum/skia-discuss as they may now of any internal changes. Maybe it is the codec? Maybe it is the pixel data? But thanks for the issue. If it is a new "feature" then at least we have a heads up. And if it is a bug, then we can track any changes. |
Yes, the first thing I did was to compare both PNG files. These are very different. Strangely enough, copying the color space data from the correct PNG to the bad one didn't fix this... But I have to dig deeper, and indeed ask in Skia because this is not a SkiaSharp issue it seems. JPEG and WebP seem to work, and copying the PNG to a F16 sRGB bitmap and then saving also works. But I think you are right, most likely they now copy the linear colorspace info to the PNG, and WIC most likely doesn't understand this. So this seems like a Windows bug :-) |
Oh... Did you actually test on other platforms? Maybe attach the png and then I can test if you don't have all the bits. |
No I only tested this on Windows. I'm trying to reproduce it via remote desktop, but I can't, the PNG that looked too dark yesterday looks fine via remote desktop! So maybe this is because of color profiles on my monitors. Will know as soon as I go back to the office. |
I see the difference... crazy!
Just open another issue if you are having problems building... Maybe I need to update docs or maybe there is a bug somewhere in my script. |
I was about to try the same, lol. I'm now opening this image with WIC, to see what it reports... |
Okay, when I try to create a WIC color space transform from the embedded PNG color profile to sRGB, I get the exception:
I will ask around in the Google Skia mailing list. |
FYI: The It can't be decoded into RGB with the "official" JPEG decoder from either libjpeg9 or libjpegturbo. So I guess what happens is that Skia, GIMP and Chrome decode this into a 4 channel RGBA, and when saving, A is lost. Could you try to save as PNG and see if the image indeed contains alpha? It seems the JPEG decoders need to be modified to understand special markers exported by software like Adobe Illustrator etc (as is the case with this A related very old related heated discussion: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718604 |
FYI: This is the exif info of
|
Description
When I switch existing code that uses 1.68 to the
dev/update-skia
branch, the PNGs that are saved are too dark.We are rendering in linear color space, using 16-bit floats.
If we convert the PNGs to sRGB before saving, we get the same colors.
Code
Expected Behavior
When opening the
output.png
image on Windows, in e.g. IrfanView, Paint, Photo Viewer, Visual Studio 2019, Paint.NET, etc.., the colors should be purple.Actual Behavior
When opening the
output.png
image, the colors are very dark purple.Note that the colors are correcty displayed in modern browsers, but since the behavior changed, I felt like reporting this.
Basic Information
The text was updated successfully, but these errors were encountered: