Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Semitransparent PNGs in Windows

  1. #1
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default Semitransparent PNGs in Windows

    I guess this is a graphics issue, although the solution, if one exists, is likely to be CSS...
    A script I'm developing, at http://www.twey.co.uk/?q=rubberband, uses translucent PNG images for the background, for Opera support. This is fine on a white background, but under Windows, the demo version with a black background (http://www.twey.co.uk/includes/rubber/demo-inv.html) doesn't display the background over the black, although if one looks closely one can see its effects on the white text.

    Is there any known fix for this?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    png files take up an immense amount of space, so I would suggest exporting it into a gif or jpg format

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I would suggest reading the question before posting. If you know of a way to make GIF or JPG do alpha transparency, please do tell me.

    Besides, PNG can have a substantially smaller filesize than GIF (although obviously not JPG), especially if run through something like Pngcrush (if you're using something like Photoshop, I'd guess; it doesn't seem to yield a great advantage over the GIMP's output).

    Also, for what it's worth, I'm dealing with single-pixel images here, with a total filesize of 91 bytes each.
    Last edited by Twey; 08-05-2006 at 01:44 AM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    I've noticed though, that PNG's make the image a bit darker, which can kind of screw things up if your doing say, a graphic or something with the same background as the page. Which brings us back to the orignal issue. If you could make them transparent, that wouldn't be a problem
    - Mike

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    That's due to gamma correction, a rather kludged idea that went on to be poorly implemented See http://hsivonen.iki.fi/png-gamma/ for some more details.

    They are transparent :-\ That's not the problem. The problem is that on Windows, the black background isn't compensated for and they're totally invisible.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    They look exactly the same to me.Checked in Opera,IE,and firefox because you didn't specify

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It does look exactly the same, in every browser on Windows. Try viewing it in another operating system.

    Maybe I should provide screenshots.

    /EDIT: Here we go, this is what it looks like on Linux.
    Here is a mock-up of how Windows displays it.
    I don't know if Mac OS X will display it properly or not. I'd suspect so, but I'm not sure.
    Last edited by Twey; 08-05-2006 at 02:12 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Works fine for me too. Tested in firefox 1.5(latest stable version)(windows xp)

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I know it works (other than some odd border-width issues), but the problem is that it doesn't look like this on Windows.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Twey, it does(At least in my computer).

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
  •