SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member pixelhed's Avatar
    Join Date
    Jun 2004
    Location
    UK
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    png alpha transparency in ie : colors wrong

    Hi

    I use javascript method to assign transparent background images (pngs) to divs, and it works fine. The images have alpha transparency.

    The problem is that the foreground color, is not the same as it was before the image was made transparent (example image : right side: dark red part). The actual color of the foreground in the image used is that on the left side of the example image.

    I think that the problem lies in the AlphaImageLoader filter used, it somehow changes the foreground color too. I would really like to sort this problem out, but have not found any solutions. Has anyone had this problem before, and how did you correct it:

    Example image:


    Thanks in advance

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    I haven't bothered to use transparency much because of the lack of support so I can't offer any advice I'm afraid.

    Heres a couple of links that may or maynot be useful.

    http://homepage.ntlworld.com/bobosola/
    http://www.sitepoint.com/forums/show...a+transparency

    Paul

  3. #3
    SitePoint Member pixelhed's Avatar
    Join Date
    Jun 2004
    Location
    UK
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    color problem & transparency solution

    Hi Paul

    I found the answer !!

    Photoshop pngs have some gamma info included in the files when you output them, and (apparently) there is no way to remove it when outputting from photoshop. IE misinterprets this info, and results in the different color rendering shown in my image (prevous post).

    What is needed is a little application called pngcrush, that runs on the command line, and performs various compression roles, one of them is... you guessed it, removing the gamma info. I just ran it on my problem pngs, et voila seamless



    resources
    original discussion: http://www.alistapart.com/discuss/pngopacity/7/
    pngcrush: http://pmt.sourceforge.net/pngcrush/
    javascript solution to alpha transparency trouble in IE: http://www.alistapart.com/articles/pngopacity/

    Using these techinques i now have full cross browser png alpha transparency : JOY !!!!

    Hopefully this info is useful to someone.

    laters
    A

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hopefully this info is useful to someone
    I'm sure it will be and thanks for posting the solution

    I shall try and remember it in case anyone else asks

    Paul


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •