Jump to content

.PNG, authoring and Internet Explorer


SoulSe
 Share

Recommended Posts

I am posting this under 'Everything Linux' because it is another example of M$ combatting the open source.

 

I have just spent a few hours making graphics for my new website using the Gimp (of course) and I made use of transparent backgrounds.

 

Now in Mozilla, my site looks hot. But when people using Internet Explorer open it up, most of the graphics have lost their transparency and it looks horrible.

 

A little bit of googling came up with the answer that IE does not properly support the png format and nobody could come up with a better answer why, other then a blatant stab at the open source from M$. Now, I know that there are licensing issues with the .gif format, this is one of the reasons why I prefer png, but it is not a big one. I use png because I find the compression and the texturing of my images to be better.

 

Does anybody have a suggestion for a quick fix to my graphics? I want to keep them as png, so don't suggest saving them as gifs. I am also aware of the fact that there is a registry patch for winblows which fixes the problem, but since I have no control over the computers of people browsing my page, it does not help.

 

EDIT: Also, why if I use .css to centre the contents of a <td>, they are perfectly centered in Mozilla, but off centre in IE?

Link to comment
Share on other sites

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

Hey,

 

Perhaps you'd like to take a look at the following article.

 

http://www.alistapart.com/stories/pngopacity/

 

 

* Note to Edit:

CSS support isn't 100% conform across all browsers. Browser makers are allowed to interpret a rule in different ways. Apart from this, there are also bugs and CSS rules not supported in the 4+ browsers.

 

Darkelve

Link to comment
Share on other sites

The same happened to me, see here:

http://karely.emmanuel.free.fr

 

Have a look with IE too,... out of protest I made the extra pages to get people to use something other than IE.

 

Note that IE for Mac works fine!

 

So yes, they have crippled .png transparency on purpose, since Unisys is a good friend of MS and owns the gif patent, which currently is the only transparency capable image format.

 

But gif is only 256 colors... :(

 

So that's what you get if you allow a company to be a monopolist...

 

Sorry, I don't know what to do about it... I just caved and converted to gif..

Link to comment
Share on other sites

got php?

<?

// usage:

//      put_png("path/to/my_transparent.png", width, height);

function put_png($path2img, $width, $height)

       {

       global $HTTP_USER_AGENT;

       $suffix = "px"; // this is for style size ... example 10px

       if (ereg("MSIE", $HTTP_USER_AGENT) && ereg("Windows", $HTTP_USER_AGENT) && !ereg("Opera", $HTTP_USER_AGENT))

               {

               echo"<div id="stoopid_MS" style="position:relative; height:$height$suffix; width:$width$suffix; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='$path2img',sizingMethod='scale');"></div>";

               } else {

               echo"<img src="$path2img" width="$width" height="$height">";

               }

       }

?>

Link to comment
Share on other sites

Gif is not only 256 color, but it also only supports transparency as a colour, meaning that on a textured background such as mine, it is useless.

 

Darkelve's article is great, thank you. It explains it all neatly and provides a few solutions, like loading a filter into IE via some code on your page.

 

The problem is that I use mouse over effects with java to spruce up the page and it is going to be one long mission getting that to co-operate with the filter. Especially for someone who can only code html!

 

This is really pissing me off, I spent SO long on my graphics. I swear I'm just going to implement that code that crashes IE and just optimise my page for Mozilla. Problem is that of the 1200+ people that have used my page in the two months it was up, everyone used IE except three people.

 

In case you are wondering about the page I am referring to, you can get an idea of it here: www.tuksfm.co.za/x/index.php - that is where I experiment, so don't expect to see anything except half a front page...

Link to comment
Share on other sites

Paul to the rescue!

 

I was typing that last reply while you were posting.

 

That looks great, but what about rollovers? I have two images, and on mouseover it changes to da other one - was using java to do it.... never thought of using php and don't have the know how.

Link to comment
Share on other sites

function over_image(parm_name)

   {

       document[parm_name].src = eval(parm_name + "_on.src");

       document[parm_name].className="stoopid_ms2";

   }



function off_image(parm_name)

   {

       document[parm_name].src = eval(parm_name + "_off.src");

       document[parm_name].className="stoopid_ms1";

   }



<a href="index.php" onmouseover="over_image('img0');" onmouseout="off_image('img0')"><img src="images/home.png" border="0" name="img0" alt="Home" class="stoopid_MS1"></a>

 

I guess with something like this you would need to write a stlye class for each mouseover effect :-(

like img.img0-1 { } and img.img0-2 {} etc etc etc

Link to comment
Share on other sites

Thanks Paul! If you weren't on a different continent, you would be consuming beer tonight on me!

 

My knowledge of PHP is still very limited, but I'm sure I will get it working.

I'll let you all know how it goes. :wink:

Link to comment
Share on other sites

Same problem here. If one look my avatar in IE, the uptime does not shows up (just a black bar below tux). On any other browser, the uptime shows up #1 below tux.

 

I hate IE!

 

MottS

Link to comment
Share on other sites

I hate IE!

 

MottS

YEAHHHH!!! That's the spirit!!!!!!!

To relieve M$ related frustration try the following

as root type

urpmi xbill &&

xbill

What level can you get up to?

 

James

 

_________________

Windows hasn't increased computer literacy. It's just lowered the standard.

..A Microsoft spokesperson said, "while fighting software piracy is good for our business, highway robbery is our business."

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...