Live data from Hacker News

PNG in Chrome shows a different image than in Safari or any desktop app

lr0.org

31–40 of 49 posts

Re: PNG in Chrome shows a different image than in Safari or any desktop app

#31
post #27

Something is off about this. > 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…

By definition any chunk beginning with a lowercase is optional. I’m just surprised gamma is considered optional.

Right, I guess that's our full story then. I further found some quibbles about that chunk being historically fraught specifically, so many decoders would intentionally ignore it under specific circumstances. I guess this file met the criteria.

Re: PNG in Chrome shows a different image than in Safari or any desktop app

#32
Very interesting! I tried holding down on the image to open the context menu and open it in a new tab. In the context menu, I could see a bright and vivid thumbnail of the image, but when I clicked "Press image in a new tab" it showed the same washed out image as on the web page. Interesting!

(I'm running Brave Mobile if that matters. I'm curious if the thumbnail is rendered differently on other mobile web browsers as well?)

Re: PNG in Chrome shows a different image than in Safari or any desktop app

#33
post #19
post #8

Earlier quoted context omitted.

"correct" in fail, in the same way across browsers? that's hilarious. I forget that throughout the history of the internet the one thing we've been able to depend on is different browsers behaving the same way

interoperability of web features has never been this good and it's only getting better https://wpt.fyi/interop-2025 other than the Manifest v3 fiasco, we're probably living in the golden age of web interop

If I’m not mistaken, they only select a couple of features to work on every year—the ones they already agree on to begin with—and the high interoperability shown in the link only concerns those few select features.

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.

Re: PNG in Chrome shows a different image than in Safari or any desktop app

#34

Something is off about this. > 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…

gAMA dates back to the days when hardly anyone had a clue about color primaries and colorspaces, let alone commonly tried to synchronize them across displays. It's explicitly ignored by everyone if the file uses any more modern method of signaling colorspace information, so really OP needs actually to write a colorspace to the file (cICP, iCCP, even an sRGB chunk) instead of merely claiming on their blog they wrote a colorspace.

Re: PNG in Chrome shows a different image than in Safari or any desktop app

#35
post #19
post #8

Earlier quoted context omitted.

"correct" in fail, in the same way across browsers? that's hilarious. I forget that throughout the history of the internet the one thing we've been able to depend on is different browsers behaving the same way

interoperability of web features has never been this good and it's only getting better https://wpt.fyi/interop-2025 other than the Manifest v3 fiasco, we're probably living in the golden age of web interop

While not disputing in any way the truth of what you're saying: I'm a product manager who leans toward Safari, while the devs I work with use Chrome almost exclusively, and we have an unwritten agreement that when it comes to display/layout issues, I'll double check in Chrome before filing the bug. It's only been Safari-exclusive a handful of times, but that's enough that it's annoying for everyone when it's just me.

Re: PNG in Chrome shows a different image than in Safari or any desktop app

#36
post #16

Earlier quoted context omitted.

Another good test page for the browser: https://www.color.org/version4html.xalter

Where, for reference, Safari shows an image that matches the first one listed—meaning, at least in theory, that it fully supports ICC profiles.

Interesting: for me, the image quadrants display correctly in Safari, but there is a horizontal white line between the top and bottom left quadrants. You're not seeing that?

Re: PNG in Chrome shows a different image than in Safari or any desktop app

#37
post #27

Earlier quoted context omitted.

By definition any chunk beginning with a lowercase is optional. I’m just surprised gamma is considered optional.

Right, I guess that's our full story then. I further found some quibbles about that chunk being historically fraught specifically, so many decoders would intentionally ignore it under specific circumstances. I guess this file met the criteria.

I have a vague recollection of tangling with it myself. I worked with PNG decoding when it was a new format and that’s like 28 years ago.

Re: PNG in Chrome shows a different image than in Safari or any desktop app

#39
I was wondering why, in my Firefox, the image appears saturated when embedded on the website, but opening it in a new tab by a direct URL shows an unsaturated version. The `img` tag on the website seems to be styled with `mix-blend-mode: multiply`, which makes the image darker because the background is #f0f0f0.

Re: PNG in Chrome shows a different image than in Safari or any desktop app

#40
post #19

Earlier quoted context omitted.

interoperability of web features has never been this good and it's only getting better https://wpt.fyi/interop-2025 other than the Manifest v3 fiasco, we're probably living in the golden age of web interop

Ugh, I hate toggle switches like the Stable/Experimental one. Which one is selected? I can’t tell. Which one of them has the better results?

Experimental is just the unreleased versions of the browsers. Like a beta or alpha for the next release. So ofc they're usually gonna be ahead.

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-...

Post reply on HN