Hacker News
PNG in Chrome shows a different image than in Safari or any desktop app
perching_aix
|next
[-]
> Plot twist; here was never a gAMA chunk to begin with!
But I do see a gAMA chunk in the file?
> 00 00 00 04 67 41 4d 41 00 03 5b 5e 5c ff 26 78
Which decodes to a value of 2.19998. Conversely, I don't see any bundled ICC profiles (iCCP chunks).
Mind you, I am able to reproduce the different colors, so something is indeed wrong. Chrome (Windows) and the Photos app (MS Store) both present it as a washed out, ghostly image (I wouldn't describe it as foggy, as that to me suggests a blur as well, but alas). In contrast, when I open it in MS Paint (the modern, MS Store app version), I do get saturated colors.
UPDATE:
The gAMA chunk not only exists, its value is wrong! That's the author's issue. Either they authored the image incorrectly, or their authoring software is getting it wrong.
> Aha! Surely this is a gamma correction issue. Chrome must be applying gamma math differently than desktop apps.
And so the author was actually correct here, just the wrong way around. The actual gAMA value stored in the picture is ~2.2, while 0.45455 would be the correct value for a typical sRGB gAMA chunk (1÷2.2). Gamma is 1÷display_exponent, and so the usual "~2.2 gamma" you hear is actually that display_exponent in this context; see: https://www.w3.org/TR/2003/REC-PNG-20031110/#12Encoder-gamma...
After hex editing the gAMA chunk to actually feature the "default" 0.45455 instead, the image now renders correctly everywhere for me.
For those looking to repro, these are the bytes I substituted in:
> 00 00 00 04 67 41 4D 41 00 00 B1 8F 0B FC 61 05
The actual difference then is that apparently some apps simply ignore this chunk and just force 0.45455 anyways.
hinkley
|root
|parent
|next
[-]
brigade
|root
|parent
|previous
[-]
dcrazy
|next
|previous
[-]
I think it’s far more likely that whatever chain of open-source image modification tools the author is using has written out pixel values in a different colorspace than the one named in the embedded ICC profile.
But if the author is absolutely confident in their analysis, they are welcome to file a bug report: https://bugs.webkit.org/
PaulHoule
|root
|parent
|next
[-]
What gets me is that the image he's publishing is not really a PNG kind of image.
[1] https://cybereality.com/rendepth-red-cyan-anaglyph-filter-op... is a write up that didn't go as deep as my research
hinkley
|root
|parent
|next
|previous
[-]
culi
|root
|parent
|next
|previous
[-]
dylan604
|root
|parent
[-]
culi
|root
|parent
[-]
other than the Manifest v3 fiasco, we're probably living in the golden age of web interop
dylan604
|root
|parent
|next
[-]
culi
|root
|parent
[-]
Every year the major browsers get together and agree on a set of "focus areas" that are paint points for browser interoperability. They've been doing it since 2021. I posted the 2025 results. All browsers reached about 99% support for the selected features
The features are voted on by web developers. Basically anyone with a GitHub account can get involved. Here's a blog post with more info about the process https://webkit.org/blog/17320/submit-your-ideas-for-interop-...
gcanyon
|root
|parent
|next
|previous
[-]
culi
|root
|parent
|next
[-]
Except for printing. Printing has and seemingly always will f'n suck. Unfortunately WPT doesn't have a good way of testing for print-related features
danaris
|root
|parent
|previous
[-]
And this is a big part of the problem with having Chrome become such a dominant force on the web: people assume that it's correct when Safari displays something differently. And people give instructions and documentation for how to do various things "in HTML/CSS/JS" when they've never tested them in anything other than Chrome, so if Chrome's behavior deviates from the spec there, someone implementing those instructions on Safari will see them fail, and assume incorrectly that it's Safari that's wrong.
Note that I am not saying this is what is happening in any specific case—but because Chrome is so dominant, enough people treat it as the de-facto standard that over time, it becomes a near-inevitability that this will happen in some cases.
F3nd0
|root
|parent
|previous
[-]
For example, JPEG XL has been proposed for Interop a few times before, but never selected. Therefore, Safari remains the only major browser to support it so far.
culi
|root
|parent
[-]
https://webkit.org/blog/17320/submit-your-ideas-for-interop-...
And yes JPEG XL support is often the most requested feature and the major browsers have responded. Google and Firefox are both willing to take it on but Firefox's biggest concern is with the reference decoder which has some major security flaws. They basically want to wait until libjxl/jxl-rs is performant enough
https://github.com/mozilla/standards-positions/pull/1064
Here's the current issue for that proposal if you want to get involved
F3nd0
|root
|parent
[-]
Hopefully they've both finally settled on a reasoning and will stick with it until the end.
culi
|root
|parent
[-]
There's been a lot of major changes since then though. Like Apple fully adopting JPEG XL and PDF announcing support as well.
I know many in the industry also think that AV2 might be a huge game changer and wanna wait and see how that ends up before choosing what standards to adopt.
lr0
|root
|parent
|previous
[-]
dcrazy
|root
|parent
|next
[-]
A good test would be to run a single 100% sRGB red pixel through your image processing pipeline, and then inspecting the resulting PNG file in a hex editor to see what value is encoded.
You can also visit this web page to actively test each web browser’s respect for embedded ICC profiles: https://www.gballard.net/psd/go_live_page_profile/embeddedJP...
mirashii
|root
|parent
|next
[-]
danaris
|root
|parent
[-]
gcanyon
|root
|parent
[-]
smileybarry
|root
|parent
|next
[-]
alwillis
|root
|parent
|previous
[-]
The WebKit blog from 2016:
WebKit color-matches all images on both iOS and macOS. This means that if the image has a color profile, we will make sure the colors in the image are accurately represented on the display, whether it is normal or wide gamut. This is useful since many digital cameras don’t use sRGB in their raw format, so simply interpreting the red, green and blue values as such is unlikely to produce the correct color. Typically, you won’t have to do anything to get this color-matching. Nearly all image processing software allows you to tag an image with a color profile, and many do it by default.
[1]: https://webkit.org/blog/6682/improving-color-on-the-web/
dylan604
|next
|previous
[-]
That's not how color management is meant to work. The color profile tells you how the data is saved. If you are displaying it using a different color profile, then it needs to be converted. Displaying P3 in sRGB is doing it wrong. How can you conclude Chrome "was not wrong"?
ccgus
|next
|previous
[-]
> (1) The PNG contains an embedded ICC color profile* (likely Display-P3 or another wide-gamut color space),
Why didn't you check? From what I can tell when I did, there is no color profile in the original image so it'll default to sRGB. This really looks like a gamma issue of some sort (see @perching_aix's comment).
firefax
|next
|previous
[-]
Why does the page 404 when opening the image? Bandwidth issue? Firefox issue? (Yes, the username is a joke - I don't work for Firefox I just use it and thought this would be a funny name)
they wayback machine doesn't have a copy of https://lr0.org/i/2025-12-27_18-21-51_screenshot.png or i was going to link to it in the post here usually, i'd try to balance a blunt reply like this with they wayback version
cheers!
Edit: https://web.archive.org/web/20251227181428if_/https://lr0.or...
lr0
|root
|parent
[-]
black3r
|root
|parent
|next
[-]
maybe you linked a different picture?
firefax
|root
|parent
|previous
[-]
https://web.archive.org/web/20251227181428if_/https://lr0.or...
garciansmith
|next
|previous
[-]
brokensegue
|next
|previous
[-]
regenschutz
|next
|previous
[-]
(I'm running Brave Mobile if that matters. I'm curious if the thumbnail is rendered differently on other mobile web browsers as well?)
purplesyringa
|next
|previous
[-]
msla
|next
|previous
[-]
> If you are using Netscape(*) you will probably see the happy cow above. Internet Explorer-users on Windows and Mac, however, will see a dead flat elephant. And this is due to a strange browser-feature.
> (*) or MSIE for Solaris
Yes, Netscape and MSIE on Solaris. This goes back to the 1990s:
https://web.archive.org/web/19990222144857/http://x42.com/ko...
hinkley
|next
|previous
[-]
What is this nonsense about? I’m on a tablet and over 1/3rd of my screen is basically telling me to go fuck myself?