Print Page | Close Window

Bug: disappearing PNGs

Printed From: Pixel Joint
Category: The Lounge
Forum Name: Resources and Support
Forum Discription: Help your fellow pixel artists out with links to good tutorials, other forums, software, fonts, etc. Bugs and support issues should go here as well.
URL: https://pixeljoint.com/forum/forum_posts.asp?TID=731
Printed Date: 27 October 2025 at 4:16am


Topic: Bug: disappearing PNGs
Posted By: 1ucas
Subject: Bug: disappearing PNGs
Date Posted: 16 August 2005 at 6:05am
I'm not sure what's going on, but it just happens in this website and just with PNGs.

They start loading but then POOF!, they disappear. I have to check the source code and copy their url in order to see it.

This is happening both in the forums and in the rest of the website, and it started about two/three weeks ago, I think. Not a clue of what's going on yet, but I'm studying the source code to see if notice anything;

Oh yeah, it seems to be an Opera-only issue as well. Damn. [ I refuse to change browser, so don't even dare to use the "get firefox" routine ]

What a noticed:

The part of the code that makes the galleries come out as a huge clump, without any CRLF in the whole thing. Maybe Opera is unable to read these properly (still, why just pngs?). Maybe this happened after you (sedge) changed the links to the icons from "pixels/pixels/icons/icon_###" (or whatever) to ###.html.

Gotta see what's wrong with the forum yet.

-------------
http://toxicdump.org/labs/frameviewer/viewer.php - Online Animated GIF Frame Viewer



Replies:
Posted By: sedgemonkey
Date Posted: 16 August 2005 at 7:59am

We added a PNG transparency script for IE that might be conflicting with Opera. I'll look into it.



Posted By: 1ucas
Date Posted: 16 August 2005 at 9:03am
Oh, I see. I know sh*t of js, as of yet, but I tried to instinctively fix the code adding a little if:


// Correctly handle PNG transparency in Win IE 5.5 or higher.
// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004

function correctPNG()
   if (navigator.userAgent.toLowerCase() == "microsoft internet explorer") {
   {
   for(var i=0; i<document.images.length; i++)
{
var img = document.images
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : ""
var imgClass = (img.className) ? "class='" + img.className + "' " : ""
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
var imgStyle = "display:inline-block;" + img.style.cssText
if (img.align == "left") imgStyle = "float:left;" + imgStyle
if (img.align == "right") imgStyle = "float:right;" + imgStyle
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
   }
   }
window.attachEvent("onload", correctPNG);


Make a little test.

-------------
http://toxicdump.org/labs/frameviewer/viewer.php - Online Animated GIF Frame Viewer


Posted By: sedgemonkey
Date Posted: 16 August 2005 at 1:48pm

Yeah... we have a browser check on every page (dom.js) so the last line is the only thing that changes...

if(oBw.ie){window.attachEvent("onload", correctPNG);}



Posted By: 1ucas
Date Posted: 16 August 2005 at 2:38pm
Well, okay then. That'll probably fix it.   

-------------
http://toxicdump.org/labs/frameviewer/viewer.php - Online Animated GIF Frame Viewer


Posted By: sedgemonkey
Date Posted: 16 August 2005 at 5:22pm

Would you mind giving it a go now my Opera guinea pig? 



Posted By: 1ucas
Date Posted: 16 August 2005 at 8:45pm
Nope. Didn't seem to have worked. :|

Bleh, I gotta learn this JS stuff.

-------------
http://toxicdump.org/labs/frameviewer/viewer.php - Online Animated GIF Frame Viewer


Posted By: sedgemonkey
Date Posted: 17 August 2005 at 8:29am

Grrrrrr.  I'll download Opera tonight and get it resolved.




Print Page | Close Window