Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 01-15-2007, 03:18 PM
jgrayson Offline
pixelpost guru
 
Join Date: Jun 2006
Posts: 125
problem with fade in script - need help

i just recently noticed a weird behavior in IE (both IE6 and IE7) with the fade in script that's causing white specs to appear on some of my images. this is what it's doing to some of my images:


i currently have the script turned off because for the life of me i can't figure out why it's happening (other then the fact that IE sucks because the image itself doesn't have the white specs and it's not happening. my guess is that the white pixels are actually transparent pixels because the color that is showing through is actually the color of the BG behind the photo itself. it seems that only the darkest pixels are remaining transparent.

this is the script code i'm using:
Code:
document.write("<style type='text/css'>#photo2 {visibility:hidden;}</style>");

function initImage() {
	imageId = 'photo2';
	imgobj = document.getElementById(imageId);
	setOpacity(imgobj, 0);
	imgobj.style.visibility = 'visible';
	fadeIn(imageId,0);
}
function fadeIn(objId,opacity) {
	if (document.getElementById) {
		obj = document.getElementById(objId);
		if (opacity <= 100) {
			setOpacity(obj, opacity);
			opacity += 10;
			window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
		}
	}
}
function setOpacity(obj, opacity) {
	opacity = (opacity == 100)?99.999:opacity;
  
	// IE/Win
	obj.style.filter = "alpha(opacity:"+opacity+")";
  
	// Safari<1.2, Konqueror
	obj.style.KHTMLOpacity = opacity/100;
  
	// Older Mozilla and Firefox
	obj.style.MozOpacity = opacity/100;
  
	// Safari 1.2, newer Firefox and Mozilla, CSS3
	obj.style.opacity = opacity/100;
}
window.onload = function() {initImage()}
this is the img scr code on the photo:
Code:
<img src="images/xxxxx.jpg" id="photo2" />
and the css for photo2 in my stylesheet is currently empty:
Code:
#photo2 { }


i would love more then anything is someone here could help me figure this out. i will turn on the script if you need me to.
Reply With Quote
  #2  
Old 01-15-2007, 09:08 PM
austriaka's Avatar
austriaka+ Offline
Team Pixelpost
 
Join Date: Nov 2006
Location: Germany
Posts: 1,175
Send a message via ICQ to austriaka Send a message via AIM to austriaka
I had this problem as well wenn creating the "secret image addon". The alpha filter used for IE produces somewhat like a loss of black pixels. For this reason the addon has the option to use it without the fade effect.

I did a hard work searching for that issue at google, but I didn't find any clues. As far as I can imagine (but I do not know if this is correct), it has something to do with the alpha filter. Alpha filters work on RGB-Pixels and do something with them. For me it looks like if completly black pixels (full R,G,B) are wiped away by the filter because of a calculating bug of the filter.
But I cannot tell if this is true and why it doesn't appear on all images. Perhaps it has a reason in image processing? Is Photoshop doing something with the black pixels, what alpha filter of IE doesn't like?

Sorry I cannot help you, just tell you you are not the only one with this problem

KArin
__________________
Uh!log Photoblog
My Addons
Reply With Quote
  #3  
Old 01-16-2007, 11:19 AM
m i k e b's Avatar
m i k e b Offline
pp regular
 
Join Date: Jul 2006
Location: USA
Posts: 25
Send a message via MSN to m i k e b
I had to disable transparency on my mootools effects on my site in order to "bandaid" this issue. I have yet to find a solution. For now I will just have to use effects that do not do alpha transparency.
__________________
m i k e b
Reply With Quote
  #4  
Old 01-16-2007, 12:17 PM
Dkozikowski's Avatar
Dkozikowski+ Offline
Team Pixelpost
 
Join Date: Oct 2005
Posts: 1,855
Send a message via AIM to Dkozikowski
jgrayson, I'm sorry and I am unable to help you with your transparency issues but I just wanted to chime in here and let Mike know how beautiful his template design is. So simple and it has neat functionality!

I hope you consider releasing it for download someday

Cheers!
Reply With Quote
  #5  
Old 01-17-2007, 03:33 AM
m i k e b's Avatar
m i k e b Offline
pp regular
 
Join Date: Jul 2006
Location: USA
Posts: 25
Send a message via MSN to m i k e b
dwilkinsjr, thanks. if there was enough of a request i would consider. i am using your stat addon and appreciate your work as well.

jgrayson, i am still looking into it.
__________________
m i k e b
Reply With Quote
  #6  
Old 01-17-2007, 03:09 PM
dakwegmo's Avatar
dakwegmo+ Offline
Team Pixelpost
 
Join Date: Jul 2005
Location: West of Between
Posts: 689
Quote:
Originally Posted by m i k e b View Post
dwilkinsjr, thanks. if there was enough of a request i would consider.
Put me on the list of those interested in seeing your template released publicly.
__________________
My Photoblog
If you find my help useful please consider feeding the PixelPost Kitty
If you're short on cash just feed my ego
Reply With Quote
  #7  
Old 01-17-2007, 09:02 PM
jgrayson Offline
pixelpost guru
 
Join Date: Jun 2006
Posts: 125
thanks!

thanks to everyone who chimed in.... i thought it might be an issue specific to me until i found a few people with similar alpha/transparency issues with IE as well. i was a bit annoyed because i just recently discovered the issue (i'm a web designer and i should have discovered this issue). i mostly use macs and just test on PCs and the pc i test on never showed this issue in IE6. i just installed parallels on my mac which allows me to run windows on my mac at the same time the mac os is running and noticed the issue in IE6. i then started seeing the issue on my test pc after it updated to IE7. i was pulling my hairs out because all the photos that were showing the effects were photos added to my photoblog after i had bought a new computer and thought possibly something was happening on my end with my set up.

oh well, the easiest solution was to just turn off the script... that's a lot easier then to convince millions of people to stop using inferior browsers like IE
Reply With Quote
  #8  
Old 02-06-2007, 12:14 PM
Bloke Offline
forum loafer
 
Join Date: Feb 2007
Posts: 1
Quote:
Originally Posted by jgrayson View Post
i thought it might be an issue specific to me until i found a few people with similar alpha/transparency issues with IE as well.
You're definitely not the only one. Look at, primarily, image 15 on this page in IE 6 or 7 (or even in the IE Tabs extension to Firefox) : yuk! And I thought IE7 was supposed to support proper transparency?! It's been in dev long enough...

I did a test by maxing out the Curves tool in Photoshop and overlaying it with the actual rendered image from IE and the proper image. The pixels that IE helpfully replaced for me don't appear to be the very darkest ones, as I'd originally thought. It's close (#02050a) but not black.

I figured it might have been the fact that a png/gif was being overlaid over a jpg in the Slimbox code, but from the responses here it seems it's a mootools/fading function that's setting IE's bugged opacity filter. That's good to know so I can hone my testing to try and find a solution; many thanks. If anyone has any more pointers or fixes/kludges, I'm all, ermm, eyes.

BTW, in most of the other pictures I've managed to edit out that bogus colour through judicial use of the smudge/blur/clone stamp tools :-) But I'm sure as hell not going to attempt that on image 15! Maybe the colour replacement tool though...
Reply With Quote
  #9  
Old 02-23-2007, 08:39 AM
owen-b Offline
pp veteran
 
Join Date: Aug 2006
Posts: 58
Is there a way to disable the effect on just IE, and leave it on for the people that use the infinitely superior browsers?

Also, any idea how the moodaholic fella doesn't have this problem?
Reply With Quote
  #10  
Old 02-23-2007, 11:00 AM
austriaka's Avatar
austriaka+ Offline
Team Pixelpost
 
Join Date: Nov 2006
Location: Germany
Posts: 1,175
Send a message via ICQ to austriaka Send a message via AIM to austriaka
Quote:
Originally Posted by owen-b View Post
Is there a way to disable the effect on just IE, and leave it on for the people that use the infinitely superior browsers?
of course: use "opacity" and leave the IE proprietary alpha-thing.
Besides "opacity" validates with CSS2.0

KArin

PS: it seems somehow misterious but since I changed my template the opacity doesn't seem to produce any pixel failures in IE anymore... Perhaps IE7 was updated with that?
__________________
Uh!log Photoblog
My Addons
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 09:38 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs