8

IE6 and IE7 don't scale images nicely in web pages when the images are scaled with css width/height or attribute width/height. I am not sure which algorithm it uses by default, but it's not good.

Scaled images display aliasing artifacts when scaled in these browsers.

user7116
  • 63,008
  • 17
  • 141
  • 172
apinstein
  • 5,105
  • 1
  • 23
  • 22
  • Is this a real question? You posted the answer 2 seconds after the question. – Crescent Fresh Mar 25 '09 at 14:02
  • crescentfresh: It's okay to ask and answer your own question if the information wasn't on the site before. It's better than okay, it's encouraged. Share the knowledge. – Bill the Lizard Mar 25 '09 at 14:05
  • I thought the community would consider this like Rep whoring. For the record I'm not the one who flagged as offensive. I liked the answer (but neither upvoted nor downvoted). – Crescent Fresh Mar 25 '09 at 14:12
  • From the SO FAQ: "It's also perfectly fine to ask and answer your own programming question, but pretend you're on Jeopardy: phrase it in the form of a question." Also, there is a "self-learner" badge that you get when you do this a few times. Maybe they should add a self-answered tag? – apinstein Mar 26 '09 at 13:29
  • Aha there already is a selfanswer tag. Not widely used (6). I'll start using that in the future and hopefully quell the populist rage! – apinstein Mar 26 '09 at 13:31
  • jQuery plugin: http://stackoverflow.com/questions/34965904/ie-thumbnail-pixelation-when-high-resolution-image-is-set-to-small-size – Anton Lyhin Jan 23 '16 at 16:49

1 Answers1

9

Fortunately there's a way to force IE7 to use the bicubic scaling algorithm (which looks very nice) with a simple css rule:

img { -ms-interpolation-mode: bicubic; }

The results are great, and it can be done site-wide with this single rule.

For IE6 you're out of luck as far as I know.

apinstein
  • 5,105
  • 1
  • 23
  • 22
  • I don't get what's offensive about this. Asking and answering your own question is a practice that's encouraged on SO. What would you prefer someone do, keep their knowledge to themselves? – tvanfosson Mar 25 '09 at 14:00
  • Thank you! I've been asking & answering my own q's to SHARE KNOWLEDGE and people have been modding me down :( The SO instructions specifically say that it's OK to do this, otherwise I wouldn't have. Thanks for the note about IE6, I think I forgot that nugget. I'll edit the orig answer. – apinstein Mar 25 '09 at 17:17
  • Also I'll point out that I originally got this tip from Joel Splosky's blog, but I think it deserves to be on Stack Overflow! – apinstein Mar 25 '09 at 17:18