TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why does this png display differently in Chrome/Firefox than in Safari/IE?

279 点作者 miorel大约 12 年前

17 条评论

Centigonal大约 12 年前
The the image consists of a checkerboard-style pattern of pixels. The "dark" pixels form the apple image, while the "light" ones show the pear. The answer to the SO question suggests that the gamma correction information (which is used by Chrome and FF, but not by older IE) makes the image darker, blacking out the apple and revealing the pear. Without gamma correction, the apple is visible, and the pear becomes a light-colored ghost.<p>edit: I put together the pieces! yay! :D
评论 #5506216 未加载
评论 #5506253 未加载
justin_大约 12 年前
Using Photoshop I tried to make my own image like this.<p><a href="http://i.imgur.com/36EgeOF.png" rel="nofollow">http://i.imgur.com/36EgeOF.png</a><p>It's a mix of Tux and the GNU logo. The strange thing is that Firefox shows Tux, and Chrome shows the GNU logo. Very strange considering both Firefox and Chrome show the pear. My understanding is that the GNU logo (the 'lighter' image) should be shown if the gamma correction is applied. Does anyone know what's going on here?<p>EDIT: By removing the iCCP color profile chunk, the image displays properly in Firefox.<p>For anyone interested in making one:<p>First, I put the two images on separate layers in photoshop. I changed the output levels on Tux to be from 0 to 210, darkening it slightly. I changed the output levels on the GNU logo to be from 215 to 255, making it very bright. Then I used a layer mask on the top layer with a grid pattern to mix the two images. The saved image was a mix of the relatively normal Tux pixels and the bright GNU pixels.<p>The final touch was editing the gAMA value in the PNG. Using the free program, TweakPNG, I set it to something very low, like in the pear image: 0.02. And that was it!
评论 #5506506 未加载
joenathan大约 12 年前
Even stranger on Windows 8 the thumbnail shows up as an apple but when opened the Windows Photo Viewer shows it as a pear.<p><a href="http://i.minus.com/ilnhPD7qumz9e.PNG" rel="nofollow">http://i.minus.com/ilnhPD7qumz9e.PNG</a>
评论 #5510718 未加载
评论 #5506479 未加载
Steuard大约 12 年前
The thing that puzzles me is that the image opens in GIMP showing the apple (incorrectly, apparently). I would have thought that GIMP would be entirely aware of embedded color/gamma information like this. (It certainly makes enough of a fuss about color profiles practically every time I open an image!) Is the gamma somehow encoded in a less-standard way, or is GIMP just less clever than I thought?<p>(My copy of GIMP is a bit outdated, but that shouldn't be a big deal for a basic feature like this, right?)
friendly_chap大约 12 年前
I will use this trick on all of my online published images - the IE version will say:<p>"GET A REAL BROWSER"
评论 #5506958 未加载
sankha93大约 12 年前
IE10 shows a pear. It became standards complaint or what?
shurcooL大约 12 年前
This reminded me of an old trick that worked in IE6 or so, where they would use alternating pixels to take advantage of how selection highlighting worked in IE6 to make another image appear when you select it.
ajtaylor大约 12 年前
What was interesting to me was that in Chrome, if you scroll the page you can see a faint version of the apple until you stop scrolling, at which point all you see if the pear.
eitland大约 12 年前
I think this has some <i>interesting</i> applications in spearphishing etc:<p>You know the Bob Boss uses IE so you send a link to a "specially crafted" web page that uses an image like this to show the boss a completely smart solution (place high value object in this location inside vault) and ask him if it is OK. Now just get Bob to forward the link to the web page to Alise who uses some other, known web browser and she sees a map with a location outside the vault.<p>Just a thought: for now if you own the server anyway you can just do browser sniffing and send two completely different images..
评论 #5506373 未加载
评论 #5506496 未加载
dclowd9901大约 12 年前
When I drag the window, it flickers both.
mlex大约 12 年前
On my Retina monitor (Firefox Nightly), I see a pear but also the apple, though very faintly. Saving to the desktop gets me an apple, as expected.
评论 #5506155 未加载
ancarda大约 12 年前
Interesting that Chrome (on OS X) displays a pear. I was under the impression Chrome used Core Graphics which would have exhibited this behaviour too?<p>Maybe not.
评论 #5506161 未加载
评论 #5506146 未加载
marcolz大约 12 年前
Safari on an iPad mini, first edition, shows an apple (obviously) and very faintly a pear.
评论 #5507066 未加载
yjyft846jh大约 12 年前
Reminds me of this question on JPEG images: <a href="http://stackoverflow.com/questions/3937885/cross-browser-incompatibilities-in-decoding-jpeg-files" rel="nofollow">http://stackoverflow.com/questions/3937885/cross-browser-inc...</a>
baby大约 12 年前
I'm using firefox and it glitches when I scroll. So I can see the apple when I scroll. I doesn't seem like it should be the case.
评论 #5509598 未加载
tssva大约 12 年前
Chrome on Android shows an apple
derleth大约 12 年前
Reminds me of KOOLEFANT, by Magnus Bodin:<p><a href="http://x42.com/koolefant/" rel="nofollow">http://x42.com/koolefant/</a><p>This goes back to the late 1990s; the page mentions MSIE for Solaris.
评论 #5506718 未加载