Jpeg bug with alpha opacity filter (white spots appearing) RRS feed

  • Question


    In iInternet Explorer 6/7 there is a bug with jpeg images and css filter:alpha(opacity=xx) set.

    If you take a reasonably large jpeg image with a dark background and apply an opacity filter, huge white spots in the image appear (missing pixels).


    Seems that the alpha algorithm translate dark areas to white.

    This only occurs with jpegs; png images are ok.


    We need to display large photographic images and there is no way to put them in png (size goes from 256Kb to 4Mb),


    Can Microsoft provide a patch ?


    For a sample see http://www.mindthegap.it/jpeg/


    Thursday, May 8, 2008 2:51 AM

All replies

  • Very nice bug!

    Unfortunately, I don't see MS providing a patch anytime soon...

    and worse yet, filter:alpha is *currently* NOT going to be in IE8 (e.g. it has been dropped!)

    See here:
    Thursday, May 8, 2008 1:53 PM


    but even if IE will support "opacity" css, it depends on how it will be implemented.

    If the rendering library will be the same, might be the problem will be still there.....

    Any chance to see the page with IE8 ? I can add the tag for opacity: il will be ignored by 6/7 and used by 8.



    Thursday, May 8, 2008 2:26 PM
  • I was able to use this guy's solution and correct of my SOME images... i.e. the ones that had only a few pixels rendering incorrectly:




    This is a pain, though, and it doesn't fix all of the images.  The issue seems to be with "true black" pixels in JPEG's rendering as transparent.  I confirmed the transparent rendering by placing a solid red DIV behind the image and all of the random white pixels appeared red.


    As an alternative solution, I've tried setting the IMG style as "background-color:black" (to match the true black pixels) but it doesn't help.  GIF's with transparency take the "background-color" style just fine - why don't JPEG's that are rendering with transparency?  And, yes, I know that JPEG's don't actually support transparency, which is why I'm trolling the forums now...  very strange.


    Any other ideas?

    Monday, June 9, 2008 3:25 AM
  • Hi my name is Mani, m facing same problem guys please help me.
    Friday, December 23, 2011 10:39 AM