Images in ie are pixelated

23,452

The old IE method is:

-ms-interpolation-mode: bicubic;

This is poorly documented.

Share:
23,452
totneschap
Author by

totneschap

Updated on July 09, 2022

Comments

  • totneschap
    totneschap almost 2 years

    I've uploaded png images to a website, and they appear perfect in firefox, chrome and safari but they look horrible in ie. I have saved the files from photoshop, and they have a feature under image size that gives you the option to have the image as: bicubic automatic, bicubic sharper, bicubic smoother, bicubic, bilinear and nearest neighbor. Would any of these help?

    html:

    <ul class="social">
      <li><a target="_blank" href="https://plus.google.com/+ToadhallcottagesCoUk/posts"><img onmouseout=this.src='/images/googleplusgrey-flat.png' onmouseover=this.src='/images/googleplus-flat.png' src="/images/googleplusgrey-flat.png" width="38" height="38" alt="Toad Hall Cottages Google Plus Page"</a></li>
      <li><a target="_blank" href="http://www.twitter.com/thcottages"><img onmouseout=this.src='/images/twittergrey-flat.png' onmouseover=this.src='/images/twitter-flat.png' src="/images/twittergrey-flat.png" width="38" height="38" alt="Toad Hall Cottages on Twitter" /></a></li>
      <li><a target="_blank" href="http://www.facebook.com/holidaycottages"><img <img onmouseout=this.src='/images/facebookgrey-flat.png' onmouseover=this.src='/images/facebook-flat.png'  src="/images/facebookgrey-flat.png" width="38" height="38" alt="Toad Hall Cottages Facebook page"/></a></li>
      <li><a target="_blank" href="http://www.pinterest.com/thcottages/"><img <img onmouseout=this.src='/images/pinterestgrey-flat.png' onmouseover=this.src='/images/pinterest-flat.png' src="/images/pinterestgrey-flat.png" width="38" height="38" alt="Toad Hall Cottages Facebook page" /></a></li>
    </ul>
    

    css:

    img.icon { 
      vertical-align: middle; 
      margin-right: 8px; 
      margin-left: 2px;
      image-rendering:optimizeSpeed;             /* Legal fallback */
      image-rendering:-moz-crisp-edges;          /* Firefox        */
      image-rendering:-o-crisp-edges;            /* Opera          */
      image-rendering:-webkit-optimize-contrast; /* Safari         */
    }
    
  • Anton Lyhin
    Anton Lyhin over 8 years
    This issue can be solved by jQuery plugin: stackoverflow.com/questions/34965904/…
  • holodan
    holodan almost 6 years
    Imagine if the OP asked for a jQuery solution^
  • BarryCap
    BarryCap about 3 years
    Isn't this the default interpolation? I can't see a difference between this and nothing (in IE 11).
  • Barney
    Barney about 3 years
    Hi @BarryCap, no – this feature was only available in IE7 & 8 – it should not be necessary for IE9 and upwards.