1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

PNGs not displaying correctly

Discussion in 'General Software' started by OnePostWonder, Dec 22, 2012.

  1. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.28/day)
    Thanks Received:
    107
    I noticed this issue a couple days ago.

    Using this page as an example:

    Slickdeals EDIT: Mods over at Slickdeals edited this post because it didn't fit the rules. Also, the OP's link broke, so no attached images.

    The second and fourth images (from left to right) are PNGs. The second image does not display anything (because the text is black and all whitespace is black), while the fourth image only shows red/orange arrows and what's contained within.

    I've also found a couple PNGs on my computer don't display properly in IrfanView, but display just fine in Windows Photo Viewer. Also, while the thumbnails of those images display properly in Firefox, when saved to my computer the thumbnails show how IrfanView will display them. If I highlight the image that is completely black (second image), it accents the text in the thumbnail.

    So far I've tried:

    Running Firefox without add-ons.
    Rebuilding the Icon Cache.
    Changing the default image viewer for PNGs from IrfanView to Windows Photo Viewer.

    Thanks in advance.

    EDIT: Added screenshot.

    [​IMG]
    Last edited: Dec 23, 2012
  2. sneekypeet

    sneekypeet Unpaid Babysitter Staff Member

    Joined:
    Apr 12, 2006
    Messages:
    21,482 (7.08/day)
    Thanks Received:
    5,995
    what if you use windows photo viewer to open them. I went to the link and the four images show in thumbnail as well as full size for me, assuming you are speaking of these... (oops saved as .png)
    [​IMG]
  3. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.28/day)
    Thanks Received:
    107
    Sorry, when I was writing "Windows Preview" I meant to be writing Windows Photo Viewer; it opens them just fine. I'm going to check and see how IE behaves.

    I'm also going to attach a screenshot to give people a better idea what I'm talking about.
    Last edited: Dec 22, 2012
  4. Vinska

    Vinska

    Joined:
    Jul 23, 2011
    Messages:
    1,398 (1.27/day)
    Thanks Received:
    1,219
    Location:
    Kaunas, Lithuania
    Hint: What is Your default background fill color for transparent images in irfanview?
    OnePostWonder and Aquinus say thanks.
    Crunching for Team TPU
  5. Aquinus

    Aquinus Resident Wat-man

    Joined:
    Jan 28, 2012
    Messages:
    6,005 (6.56/day)
    Thanks Received:
    1,954
    Location:
    Concord, NH
    Your background is transparent, so on a black background you're not going to see the text. This isn't a complex problem, don't over-think it. If you can save it as a JPEG and it views fine, it is definitely a transparent background as JPEG doesn't support transparency and usually defaults to white.
    Chevalr1c and Vinska say thanks.
  6. animal007uk

    Joined:
    Feb 19, 2009
    Messages:
    1,205 (0.61/day)
    Thanks Received:
    262
    Location:
    Warwick, Warwickshire, England
    Aquinus is right about this, I did a test lastnight to and its defo down to transparency.
    I have a black background but when i change it to say blue i can just make out the pictures background.
  7. Vinska

    Vinska

    Joined:
    Jul 23, 2011
    Messages:
    1,398 (1.27/day)
    Thanks Received:
    1,219
    Location:
    Kaunas, Lithuania
    I'd suggest using setting either white or a checkered one (this also lets You easily see what images uses transparency. While using simply white looks a bit better most of the time, but lacks the benefit of quickly identifying transparency)
    Crunching for Team TPU
  8. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.28/day)
    Thanks Received:
    107
    Funny enough, when I was searching around the web for this issue, I came across this. It's found under Options -> Properties/Settings -> Viewing and called "Main window color". I gave that a try, and when I did it just changed the window color surrounding the image.

    Well, I gave it a try again today, this time closing the file and reopening it, and it changed the transparency to white. So thanks for compelling me to give it another go :)

    I know JPEG doesn't support transparency and that it had something to do with the PNGs transparency, but it seemed as if it just suddenly started happening and that the images displayed just fine before. I still need to look around and find a similar scenario to the one I was first experiencing in Firefox to see if all is well. I'd be surprised if it was; I don't think I've integrated IrfanView to Firefox in anyway.
    Last edited: Dec 23, 2012
  9. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.28/day)
    Thanks Received:
    107
    I'm still having trouble with images in Firefox.

    Slickdeals

    The attached PNG on that page displays like this:

    [​IMG]
  10. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.28/day)
    Thanks Received:
    107
    Removing IrfanView didn't do anything for Firefox, though I didn't really expect it to.
  11. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.28/day)
    Thanks Received:
    107
    Would it be possible others post what they're seeing when they click the attached image on the Slickdeals page? I'd really appreciate it.
  12. animal007uk

    Joined:
    Feb 19, 2009
    Messages:
    1,205 (0.61/day)
    Thanks Received:
    262
    Location:
    Warwick, Warwickshire, England
    Well the pics open for me in a new tab and show as they should (Firefox here) i do not use addons or anything either.

    [​IMG]
  13. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,352 (6.30/day)
    Thanks Received:
    3,367
    Location:
    IA, USA
    That's a problem with transparency. Instead letting the true background color through, it is substituting black. I have no idea what would cause a defect like that.

    Edit: Actually, it's probably the website. They use black backgrounds for all images instead of leaving it transparent.
    Crunching for Team TPU
  14. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.28/day)
    Thanks Received:
    107
    Thanks for the info you added in the edit. That's another piece to the puzzle.

    Is it written in the vBulletin_Lightbox Javascript to use black backgrounds? Also, do you have any idea why others' browsers isn't making use of the Lightbox script?

    I've had people restart Firefox without add-ons and make sure scripts are enabled, but it still automatically goes to what I believe is called the overlay page.
  15. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,352 (6.30/day)
    Thanks Received:
    3,367
    Location:
    IA, USA
    I have no idea without looking at it. All I know is that heavy reliance on Javascript is begging for cross-browser incapabilities.
    Crunching for Team TPU
  16. OnePostWonder

    Joined:
    Dec 27, 2008
    Messages:
    579 (0.28/day)
    Thanks Received:
    107
    Oh, when you said they use black backgrounds for all the images, you mean that you simply browsed through a couple different pages and looked at their attached thumbnails?
  17. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,352 (6.30/day)
    Thanks Received:
    3,367
    Location:
    IA, USA
    No... what you're seeing is a black behind a transparent PNG. The pictures that look fine could simply have no transparency so you don't see the black behind it.
    [​IMG]


    This guide might help you change the default background color:
    http://kb.iu.edu/data/algz.html

    Set it to white.
    Last edited: Dec 29, 2012
    Crunching for Team TPU

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page