2026/09/06

18:32 Browser Image

I wrote before about an example of an image that can change slightly depending on the browser (Opening this PNG in Chrome shows a different image than in Safari or any desktop app). Today I tried to make some kind of an advanced use of it. You can see the image here. Preview (might not work due to my image optimization workflow):

../i/browser_image.png

Briefly, this PNG has three pixel values and a hand-made ICC color profile. Per my understanding, the color changes due to differences in how the engines step in Chrome vs Safari, Chrome renders anything <128 to black and above (or equal) to that to white.

So 127 and 40 both go black (background and safari message), and 128 pops to white and you see the second message.

Safari instead remaps 127 to 187, 40 to 110, and 128 to 188. Now background (187) and the 128 message (188) are invisible, so you see the other message.

#Programming

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论