Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quality of scaled images worse in IE8/9, than in IE7

Try opening this page in IE7 and IE9.

As the page mentions, it uses -ms-interpolation-mode:bicubic.

I've read that this setting has been disabled in IE8/9 because it is now the default style (in IE7, nearest-neighbor was the default interpolation mode).

However, the image quality in IE8/9 is much worse than in IE7, as shown here:

example

What gives? Is there a way to get better scaled down images in IE8/9?

like image 893
Pratik Avatar asked Feb 15 '13 03:02

Pratik


1 Answers

Use the CSS fit-and-shrink technique, demonstrated here:

  • CSS fit-and-shrink demo

It basically layers two copies of the image, one with a fixed width and one with a fixed height, to preserve the aspect ratio.

like image 104
Paul Sweatte Avatar answered Nov 14 '22 11:11

Paul Sweatte