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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

How web browsers resize images

142 点作者 nsfmc超过 11 年前

12 条评论

mbrubeck超过 11 年前
Firefox uses the same high-quality scaler for upscaling now too, starting in Firefox 22: <a href="http://bugzil.la/795376" rel="nofollow">http:&#x2F;&#x2F;bugzil.la&#x2F;795376</a> (The results on this page were from Firefox 7 and Firefox 20.)<p>The problem with scaling multiple copies of the same image on a single page is <a href="http://bugzil.la/795072" rel="nofollow">http:&#x2F;&#x2F;bugzil.la&#x2F;795072</a>
devindotcom超过 11 年前
For some reason resampling artifacts are highly visible to me. Like minor distortion and color inaccuracy, some people see it, some people don&#x27;t, some people care, some people don&#x27;t.<p>I used to tell all the authors at techcrunch to resize before uploading, because our theme just loaded the original image and let the browser resize it. Of course this occasionally led to 2-megabyte, 1000px PNGs being rendered at 215px wide, with awful resampling errors making text look awful and taking ages to load besides. No one listened, the fools!<p>These days it seems like there are few situations that demand a &quot;cheaper&quot; resampling method than bilinear. The calculation cost and time are so minor and assets so malleable that it can&#x27;t possibly end up the bottleneck - not when you have ten or twenty widgets, scripts, and trackers loading as well.<p>It always seemed strange to me, however, that the resampling of images is browser dependent. I guess callouts to the GPU are a bit much when all you need to do is recalculate a bitmap.
评论 #6519898 未加载
dsego超过 11 年前
Too bad incorrect gamma is still a problem when resizing in browsers.<p><a href="http://filmicgames.com/archives/354" rel="nofollow">http:&#x2F;&#x2F;filmicgames.com&#x2F;archives&#x2F;354</a>
abstrakraft超过 11 年前
Can someone shed a little light on what these graphs represent? I&#x27;m assuming it&#x27;s some sort of weighting function, but the article has zero explanation of what we&#x27;re looking at - the axes aren&#x27;t even labelled.
评论 #6519258 未加载
评论 #6519204 未加载
cachvico超过 11 年前
Given that most of these browsers are open-source, isn&#x27;t this a somewhat circuitous way of going about the investigation?
评论 #6518961 未加载
vinkelhake超过 11 年前
Any information on whether the different browsers use gamma-correct resizing?
评论 #6519773 未加载
评论 #6536374 未加载
评论 #6519493 未加载
mistercow超过 11 年前
The change to linear resampling in IE9 makes me wonder if that wasn&#x27;t simply a bit of benchmark manipulation. If so, it goes to show the danger of relying to heavily on simple benchmarks.
评论 #6519136 未加载
diziet超过 11 年前
Bit more along the same lines: <a href="http://entropymine.com/imageworsener/resample/" rel="nofollow">http:&#x2F;&#x2F;entropymine.com&#x2F;imageworsener&#x2F;resample&#x2F;</a>
Filligree超过 11 年前
Chrome also uses some kind of sharpening filter for upscaling (on <i>every</i> image) if running on a HiDPI system, such as a Macbook Retina.<p>I&#x27;m not sure what filter that might be, but it sure looks good.
评论 #6520654 未加载
ohwp超过 11 年前
Some time ago I did a test for mobile screens. I used 64 color images at 2 times the size they had to be (for high-res displays).<p>High-res devices don&#x27;t scale those images, but because the pixels are so small 64 color images are still looking good.<p>Related to this post: small displays will downscale the image to 50%. I noticed that most modern browsers use a nice reduction algorithm so the interpolation of 64 colors is also looking good.
allard超过 11 年前
I have found no mobile browser (except the native Android one on my older device) that will &quot;easily&quot; show one pixel of an image at one pixel of display. You pinch through this state but but not arrive at it unless you go to great trouble.
评论 #6520905 未加载
ye超过 11 年前
If you&#x27;re going to put so many charts on the page, you might want to start with basic things like marking the axes. I have no idea what I&#x27;m looking at.