Smoothly scale images in IE (-ms-interpolation-mode: bicubic)

Today I discovered a much-improved method to fix IE7′s default image-resizing behaviour: as described in this Flickr post it is possible to tweak IE7 into applying the (much smoother) Bicubic interpolation method when scaling images.

The result is depicted in this archived post here (which also happens to provide a solution for IE6, using the infamous AlphaImageLoader).

This is definitely an improvement on my previous method: after copying the client’s images over, I used GD on my own server (as they happened to be stuck with Windows shared hosting) to perform the smooth downsampling (think imagecopyresampled) before presenting to the user. A nice effect, but cost me (and my client) precious bandwidth – this solution is much more acceptable.

Microsoft’s hidden -ms-interpolation-mode CSS property

This little gem kicks IE7′s rendering engine into touch: “-ms-interpolation-mode: bicubic;”

Possible values for those interested (from MSDN) :

/* ... */   /* (Default) - Always use nearest neighbor interpolation mode. */ -ms-interpolation-mode: nearest-neighbor;   /* --- OR --- */   /* Always use <strong>high-quality</strong> bicubic interpolation mode. */ -ms-interpolation-mode: bicubic;   /* ... */

Cheers, Dan Phillimore

About the author

  • Dan has spent the past 10 years developing specialist software, using everything from x86 assembly to C++ and VB. For the past few years he has focused on JavaScript development of high-performance virtual machines for the modern web and developing bespoke modern websites using the LAMP stack.
  • When he is not working on the next web-based OS, he spends his time out with friends, his girlfriend Jen or planning to buy an American muscle car.
You can leave a response, or trackback from your own site.

One Response to “Smoothly scale images in IE (-ms-interpolation-mode: bicubic)”

  1. meez cheats says:

    I was very delighted to discover this site on yahoo.I wished to say thanks to you with regard to this great read!! I surelyloved every little bit of it and I’ve you bookmarked to check out new stuff you post.

Leave a Reply

You must be logged in to post a comment.

Powered by WordPress | Design by OVMS, based on AnimeStar (Best MMORPGs | Thanks to MMORPG List, VPS Hosting and Website Hosting)