Png Transparency

CabooseCaboose title = name(self, handle) Join Date: 2003-02-15 Member: 13597Members, Constellation
<div class="IPBDescription">Why doesn't IE support it?</div> Yea, so I've been using IE on my friends laptop for a little bit, and I've noticed that transparent png's don't show the transparency.

png's are far better than gifs for transparency, because it's actual transparency, not just making one color transparent. Why can't MS implement png transparency?

<a href='http://homepage.ntlworld.com/bobosola/' target='_blank'>http://homepage.ntlworld.com/bobosola/</a>

there's a fix there for it, it's written in javascript and would be a cool thing to add to the forums <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->

Yea, one more reason I hate IE.

Comments

  • OttoDestructOttoDestruct Join Date: 2002-11-08 Member: 7790Members
    png generally takes up quite a bit more room though.
  • CabooseCaboose title = name(self, handle) Join Date: 2003-02-15 Member: 13597Members, Constellation
    that still doesn't acount for the lack of IE png transparency suooprt though.
  • DubbilexDubbilex Chump Join Date: 2002-11-24 Member: 9799Members
    <!--QuoteBegin-Caboose+Jun 18 2005, 04:46 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Caboose @ Jun 18 2005, 04:46 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> that still doesn't acount for the lack of IE png transparency suooprt though. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    perhaps ie7 will have it. it'll be here soon.
  • AlignAlign Remain Calm Join Date: 2002-11-02 Member: 5216Forum Moderators, Constellation
    I just imagined the announcer voice of the terrierist side in C&C Generals saying "Internet Explorer 7 will be here soon!".
  • Private_ColemanPrivate_Coleman PhD in Video Games Join Date: 2002-11-07 Member: 7510Members
    edited June 2005
    <!--QuoteBegin-Align+Jun 18 2005, 05:08 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Align @ Jun 18 2005, 05:08 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> I just imagined the announcer voice of the terrierist side in C&C Generals saying "Internet Explorer 7 will be here soon!". <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    That's amazing, so did I!

    Either way, we have learnt three things from this:

    1. <a href='http://www.microsoft.com/windows/ie/default.mspx' target='_blank'>IE</a> sucks.
    2. All friends of his should have <a href='http://www.mozilla.org/products/firefox/' target='_blank'>FireFox</a>.
    3. <a href='http://en.wikipedia.org/wiki/Terrorists' target='_blank'>Terrorists</a> work for <a href='http://www.microsoft.com/' target='_blank'>Microsoft</a>.
  • MedHeadMedHead Join Date: 2002-12-19 Member: 11115Members, Constellation
    edited June 2005
    <a href='http://blogs.msdn.com/ie/archive/2005/04/22/410963.aspx' target='_blank'>http://blogs.msdn.com/ie/archive/2005/04/22/410963.aspx</a>

    PNG support will be in Internet Explorer 7.

    <a href='http://blogs.msdn.com/ie/archive/2005/05/27/422721.aspx' target='_blank'>http://blogs.msdn.com/ie/archive/2005/05/27/422721.aspx</a>

    Unfortunately, it won't be available for any operating system other than Windows XP SP2 and above.

    Internet Explorer 6 doesn't support alpha transparency by default: it requires DirectX code to work. From what I recall, using the code in the img src makes the PNG no longer work in other browsers.

    And I hate the following sentence.
  • KurtKurt Join Date: 2005-05-19 Member: 51960Members
    edited January 2007
  • RuByRuBy Join Date: 2002-12-12 Member: 10732Members
    <!--QuoteBegin-OttoDestruct+Jun 18 2005, 03:45 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (OttoDestruct @ Jun 18 2005, 03:45 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> png generally takes up quite a bit more room though. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    LIES!

    Well it depends what format you compare it to. Compared to jpg (which is really what it should be compared to): png smokes it. Compared to gif, well gif usually wins but it also has a limited palette.

    You might have been lead to this conclusion by photoshop's horrid png handling.

    Get PNGCrush and everyone is happy:
    <a href='http://pmt.sourceforge.net/pngcrush/' target='_blank'>http://pmt.sourceforge.net/pngcrush/</a>
  • WalkaboutWalkabout Join Date: 2005-05-01 Member: 50651Banned
    <!--QuoteBegin-MedHead+Jun 18 2005, 05:26 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (MedHead @ Jun 18 2005, 05:26 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> And I hate the following sentence. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    what
  • AlignAlign Remain Calm Join Date: 2002-11-02 Member: 5216Forum Moderators, Constellation
    Medhead resents having to edit.
  • MedHeadMedHead Join Date: 2002-12-19 Member: 11115Members, Constellation
    MedHead resents the edit notification.
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    edited June 2005
    <!--QuoteBegin-RuBy+Jun 18 2005, 02:44 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (RuBy @ Jun 18 2005, 02:44 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Well it depends what format you compare it to. Compared to jpg (which is really what it should be compared to): png smokes it. Compared to gif, well gif usually wins but it also has a limited palette. <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    PNG and GIF both use indexed pattern compression that's best suited for images containing repetition or blocks of single color; JPEG uses frequency based compression and can perform far better at storing images that don't contain repetitive pixel blocks if you are willing to introduce a little noise to the image. The human eye can't pick up subtle differences between two complex images if there is enough detail, which is when you typically want to switch to JPEG anyway.

    If you're saving line art as JPEG of course it'll be far worse than either GIF or PNG (both quality and size), but if you're willing to accept some loss, JPEG fares better than ether pattern indexing format for many photographs.

    Saying that PNG is better than JPEG is like saying a nail is better than a screw. Nails and screws can hold two or more objects together; the problem statement determines which one is best.

    PNG and GIF use the same family of compression techniques (PNG was designed specifically to be a successor to GIF), so that's a much more valid comparason than PNG and JPEG. GIF is based on LZW compression, PNG uses LZ77 compression.
  • DOOManiacDOOManiac Worst. Critic. Ever. Join Date: 2002-04-17 Member: 462Members, NS1 Playtester
    edited June 2005
    Indeed PNG's pwn, and indeed IE sucks in yet another area.

    The fix is really easy though. So easy its not even worth complaining that much:

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1--><!--[if gte IE 5.5000]>
    <script type="text/javascript">
    // Correctly handle PNG transparency in Win IE 5.5 or higher.
    // [URL=http://homepage.ntlworld.com/bobosola]http://homepage.ntlworld.com/bobosola[/URL]. Updated 02-March-2004

    function correctPNG()
      {
      for(var i=0; i<document.images.length; i++)
         {
      var img = document.images[i];
      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;
         }
         }
      }

    // Onload event changed by Russell Weed to facilitate multiple onload things.
    if ( typeof window.addEventListener != "undefined" )
       window.addEventListener( "load", correctPNG, false );
    else if ( typeof window.attachEvent != "undefined" ) {
       window.attachEvent( "onload", correctPNG);
    }
    else {
       if ( window.onload != null ) {
           var oldOnload = window.onload;
           window.onload = function ( e ) {
               oldOnload( e );
               correctPNG();
           };
       }
       else
           window.onload = myInitFunction;
    }
    </script>
    <![endif]--><!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    It always sucks to have to do these type of hack things, but what are you gonna do eh? Can't tell your paying customers their e-wang is inferior and they shouldn't use the only browser they know how...
  • DrfuzzyDrfuzzy FEW... MORE.... INCHES... Join Date: 2003-09-21 Member: 21094Members
    edited June 2005
    <a href='http://www.r1ch.net/img-formats/' target='_blank'> Do be quiet, you cant beat r1's knowlage of teh computers:// Do be quiet, you cant beat r1'...f teh computers:// Do be quiet, you cant beat r1'...f teh computers</a>

    ^^ lol the forums are broekz I cant fix it D:
Sign In or Register to comment.