Image scaling causes poor quality in firefox/internet explorer but not chrome

前端 未结 10 1750
一个人的身影
一个人的身影 2020-11-27 03:44

See http://jsfiddle.net/aJ333/1/ in Chrome and then in either Firefox or Internet Explorer. The image is originally 120px, and I\'m scaling down to 28px, but it looks bad pr

10条回答
  •  眼角桃花
    2020-11-27 04:30

    IE Scaling Depends on Amount of Downsize

    Some people said that an even fraction downsize avoids the problem. I disagree.

    In IE11 I find that reducing an image by 50% (e.g. 300px to 150px) yields a jagged resize (like it's using nearest-neighbor). A resize to ~99% or 73% (e.g. 300px to 276px) yields a smoother image: bilinear or bicubic etc.

    In response I've been using images that are just retina-ish: maybe 25% bigger than would be used on a traditional 1:1 pixel mapping screen, so that IE only resizes a bit and doesn't trigger the ugliness.

提交回复
热议问题