News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

problem with PNG pics

Started by edi67, October 23, 2005, 05:19:20 AM

Previous topic - Next topic

edi67

i want put in my forum image sections in PNG format but as you know if you browse to a Web page that contains an image that has a transparent background in Portable Network Graphics (PNG) format, the image background may appear to be gray rather than transparent.

how i can solve this?

i want that PNG pics have transparent background some solution?
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Acf

Ie doesn't support it... but with a Little tweaking it does...
This is the code i used...

<DIV id=layertri><?
$msie = eregi("MSIE" , $_SERVER['HTTP_USER_AGENT']);
if ($msie == true)
{
echo ("<div title=\"png\" style=\"display: inline; width:550px; height:50px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='aW1hZ2Vz/logoglas.png',sizingMethod='scale')\"></div>");
}
else
{
echo ("<img src=\"aW1hZ2Vz/logoglas.png\" alt=\"png\" style=\"width:550px; height:50px;\">");
}
?></DIV>
Sigh...

Dannii

IE cannot show PNG transparencies. If you want to use those, you will have to use another browser such as FF or Mozilla.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

edi67

Quote from: ªcF on October 23, 2005, 07:15:24 AM
Ie doesn't support it... but with a Little tweaking it does...
This is the code i used...

<DIV id=layertri><?
$msie = eregi("MSIE" , $_SERVER['HTTP_USER_AGENT']);
if ($msie == true)
{
echo ("<div title=\"png\" style=\"display: inline; width:550px; height:50px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='aW1hZ2Vz/logoglas.png',sizingMethod='scale')\"></div>");
}
else
{
echo ("<img src=\"aW1hZ2Vz/logoglas.png\" alt=\"png\" style=\"width:550px; height:50px;\">");
}
?></DIV>


sorry where i must wrote it?
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

1MileCrash

Quote from: eldacar on October 23, 2005, 07:16:54 AM
IE cannot show PNG transparencies. If you want to use those, you will have to use another browser such as FF or Mozilla.

word. which is exactly why my avvy must look really crappish in IE.  :(
The only thing php can't do is tell you how much milk is left in the fridge.



Acf

<span STYLE="position:relative; height:100px; width:100px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='your.png',sizingMethod='scale');"></span>


This works only in IE, the normal img codes work for firefox.
I don't know where you should put it, because i am not that good in php.

I do have a javascript for it... but it doenst work right under ie +sp2.
http://members.home.nl/mazterpage/test4.html

Maybe some one can make a mod for this :)

Sigh...

Advertisement: