Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Internet Explorer The Internet Graphics Software

Implementating Transparent PNGs in IE7 97

Brandon writes "Over at the official IE Blog, Sam Fortiner has posted some very detailed information regarding Alpha PNG Rendering in IE7. From the article: 'As the dev who implemented the support, I can state that it was neither a bug-fix nor did it require a re-write of the display engine. Instead, it ended up being somewhere in-between the two and required what I would call "feature work." Implementing transparency support for PNG images required a significant amount of modification to the image decoding and display pipeline in IE along with a significant amount of new functionality added to the PNG decoder.'"
This discussion has been archived. No new comments can be posted.

Implementating Transparent PNGs in IE7

Comments Filter:
  • libpng.... (Score:5, Interesting)

    by __david__ ( 45671 ) * on Sunday May 01, 2005 @03:27AM (#12396960) Homepage
    So this implies they wrote their own PNG reading routines instead of using libpng?

    Is this some sort of NIH thing?

    libpng has a BSDish licence if I recall... So that can't be the issue...

    -David
    • Microsoft "Reinventing the Wheel ".

      .. .. would be a better slogan than "It just works"
    • Re:libpng.... (Score:5, Informative)

      by Chris_Jefferson ( 581445 ) on Sunday May 01, 2005 @05:22AM (#12397222) Homepage
      If you read the article, you'd find the main problem is that all their internal data structures and rendering system were only designed for boolean transparency.

      libpng wouldn't have helped with either of these, and this is where most of the work was.
    • So this implies they wrote their own PNG reading routines instead of using libpng?

      No. I could not find the slashdot post anymore but I remember that libpng was found in the source leak of windows 2000 / IE6.
    • Re:libpng.... (Score:3, Insightful)

      by Quarters ( 18322 )
      When Microsoft puts BSD licensed TCP/IP code in an OS people use it as a cheap opportunity to sound psuedo-intellectual by bringing it up in vague "Microsoft is bad because they didn't write their own" terms whenever possible.

      Now those same people want to say "Microsoft is bad because they didn't use BSD licensed PNG code."

      The hypocrisy is staggering.

      • Re:libpng.... (Score:3, Insightful)

        by eraserewind ( 446891 )
        Um, it's only hypocracy if the same person says it.
      • Now those same people want to say "Microsoft is bad because they didn't use BSD licensed PNG code."

        The hypocrisy is staggering.

        (1) please point out which, exactly, of "those same people" are doing both.

        (2) Even if that is the case, the point on the BSD stack thing is ususally that MSFT fails to fully implrement it. At least from my perspective.

        (3) "Staggering hypocrisy" is more than just a little, um, "staggeringly overstated", don't you think?

      • *sigh* Not this again.

        MS used BSD code in their TCP/IP stack in NT 3.5 and prior. They rewrote everything from scratch for NT 4 and on. They still use some BSD code for the userland utils (telnet, ping, etc) but there is absolutely none of it in the kernel/protocol stack, and hasn't been for at least 10 years.
  • by cwensley ( 741704 ) on Sunday May 01, 2005 @04:00AM (#12397041) Homepage
    I'd imagine this would be why IE can show images as they download, instead of waiting for the whole thing to download like other browsers...

    I could be wrong..
    • You are (Score:5, Informative)

      by leonbrooks ( 8043 ) <SentByMSBlast-No ... .brooks.fdns.net> on Sunday May 01, 2005 @04:26AM (#12397092) Homepage
      Konqueror displays partial images as they download. The original friggin' browser in OS/2 did the same thing. It's hardly new.

      Think about it: what's the whole purpose in Progressive-mode JPEGs?
      • Really? I use konqueror about 95% of my browsing time (other 5% is at work in windows) and I never noticed it. Going to a page with a really large image doesn't show anything until it's fully loaded for me.. *shrug*
        • Hm, just tried firefox and it does load (pngs) as it is downloading. An interesting question would be if the mozilla engine uses libpng, or a custom decoder..
          • Re:You are (Score:1, Interesting)

            by Anonymous Coward
            It uses libpng, just look at the shared libraries it is linked against.
        • Re:You are (Score:1, Informative)

          by Anonymous Coward
          Settings > Configure Konqueror

          In the "Web Behavior" section, check the box for "Draw frame around not completely loaded images."

          (This works for Konqueror 3.4--not sure about earlier versions)
    • I'd imagine this would be why IE can show images as they download, instead of waiting for the whole thing to download like other browsers...

      Probably not. Many formats support interlacing (or progressively higher quality data with formats like JPEG). This basically means that the same (or similar) data is present, but in a different (predictable) order allowing useful images to be displayed without having access to the entire image file. IIRC, even early versions of Netscape supported this. I know may grap
  • Monopoly (Score:5, Insightful)

    by augustz ( 18082 ) on Sunday May 01, 2005 @04:19AM (#12397077)
    This is a really interesting case study in monopoly behavior and the value of competition. Microsoft you will remember pretty much stopped IE development and shut down the IE team.

    Firefox came along, and whamo, all of a sudden Microsoft has developers writing things like. Very impressive. What's interesting for me is they are huge huge company by comparision to Firefox, but it took firefox to really get them to start making some improvements.
  • by Atrax ( 249401 ) on Sunday May 01, 2005 @04:31AM (#12397104) Homepage Journal
    put your spellchecker on danger money, baby.
  • Implementating? (Score:4, Informative)

    by eric.t.f.bat ( 102290 ) on Sunday May 01, 2005 @05:12AM (#12397196)

    Implementating? Implementating???!!!

    Something is very very wrong with the /. editors. I think it's time I spent my precious picoseconds looking at some other website.

    • Naw, they're just misoverestimavating the submittzors.
    • Re: (Score:2, Funny)

      Comment removed based on user account deletion
    • Who cares? I think it is good that the president is taking an interest in tech stuff.
    • "I think it's time I spent my precious picoseconds looking at some other website."

      If typos are such a sore spot with you, why come down into the forum area of Slashdot?
  • "Implementing transparency support for PNG images required a significant amount of modification to the image decoding and display pipeline in IE along with a significant amount of new functionality added to the PNG decoder."

    also known as...

    "we fixed the fucking PNG transparency 'bug' in IE, so stop whinning and kiss our asses."

    Too late Microsoft, I switched to the Mozilla suite loooong time ago...
  • by julie-h ( 530222 ) on Sunday May 01, 2005 @05:19AM (#12397218) Homepage
    I have a question. When there is written

    "Requires IE5, IE6, or better"

    on a website. Does that mean Firefox?

    • by FidelCatsro ( 861135 ) <fidelcatsro AT gmail DOT com> on Sunday May 01, 2005 @05:49AM (#12397277) Journal
      to me "Best viewed in Microsoft Internet Explorer" say "Wanted , new web designer/Developer"
      • Re:Requires IE5, IE6 (Score:3, Interesting)

        by Baron_Yam ( 643147 )
        As an extremely crappy web site maintainer (I maintain a moderately unimportant site as the last and least significant of many duties)...

        The first thing I did on taking over the job was convince my boss that I needed to install Firefox and a Tidy-based HTML validator to ensure the site had been coded correctly... it wasn't. Several things didn't work properly, and a few things here and there just didn't load at all.

        Now that I have Firefox on my PC, I use it by default, and pop up IE to check the site for
        • IE is a complete pain to code to , I have it installed on my Mac just for testing compatability if i ever feel like doing any web stuff.
          I end up making a php checker page sometimes to just redirect people to a striped down non complient page if they are using MSIE.
          Well thats ok for me , most of my stuff is for Unix type OS or mac so there isn't really much alternative , though i have got complaints from people whop use IE saying my site is broken , the reply is awlawys (if they are using MSIE) "No your brow
  • Fixes (Score:3, Funny)

    by Adelbert ( 873575 ) on Sunday May 01, 2005 @06:13AM (#12397329) Journal
    So IE7 will show transparent PNGs, Firefox 2.0 will render /. properly. What will I be able to complain about then?
  • CSS support? (Score:5, Insightful)

    by tryone ( 243924 ) on Sunday May 01, 2005 @06:41AM (#12397393)
    Very nice. Now go fix the crappy CSS support.
    • IE CSS support has some issues but i've found that it sometimes behaves better than Gecko's. An example is:

      <table style="display: inline; border: 1px blue dotted; "><tr><td style="border: 1px green solid;">td1 and</td><td>td2 here</td></tr></table>

      You'll see the table cell borders go beyond the table itself. Not too intuative.

      Also, there seems to be trouble with a a font and size being inherited from a table to it's cells; different from IE, but not s
      • Re:CSS support? (Score:3, Informative)

        by Nevyn ( 5505 ) *

        You need to specify "display: inline-table;" for the table element.

        • You're right, thanks. Actually according to this inline-table is a CSS2 feature, but it's noteworthy to mention that inline-block works just as well.
      • Are you trying to break CSS with your markup there, or do you have a legitimate reason for making a table display inline? When you make an element inline and force it to contain non-inline children this kind of thing happens. It'd be the same as wrapping a table with a span and complaining that the span isn't being applied correctly.
  • Png, schming (Score:3, Insightful)

    by the eric conspiracy ( 20178 ) on Sunday May 01, 2005 @08:47AM (#12397690)
    Now that the LZW patent has exprired, whoop-de-doo. Where were they when we really needed good png support?

    What we need now is something that isn't a petri dish full of a rich agar browth waiting for every sort of web infection to take root and mulitply to the destruction of your computer, and something that adheres to CSS2 standards. But we already know that these needs aren't going to be met, so all I can draw as a conclusion is IE7? Bugger off. Waste of Time. Non-starter. Count on using Firefox for the foreseeable future.

    • by Anonymous Coward
      Besides the fact it generally offers better compression, now that we have FULL transparency in IE7, we can start doing some really great things with overlaying images in styles and such. Too bad it'll be like 2012 before IE6 disappears.
  • I supose we're going to have to wait till 9 for Acid2.
  • by cei ( 107343 )
    So the safari guy writes code that passes the acid2 test last week and now this post. Makes you wonder if someone at Microsoft heard that and said, "Anybody here working on this thing?"
  • And thank Sam Fortiner for the work done! Can't you see there is a group of people trying to make a better broeser out of IE? Are you blinded by your own arrogance?
    • How about just not making it at all. FF obviously has replaced anything of value in IE.
      • Let me preface my comment by saying I use FF and not IE. I think this sort of thinking is ludicrous. Let us pretend that FF is superior to IE in every way. Wouldn't this mean that IE should work hard to surpass FF? If everybody stopped developing because there was a "better" product out there, there would be no innovation. FF is not perfect, and never will be, therefore I encourage the devs at MS to make IE as good as they can to compete.
        • I encourage the devs at MS to make IE as good as they can to compete.

          Oh, you want them to compete!? Then I think the first thing they're going to have to do is take IE out of the core OS, publish the API that a browser needs to provide in order to be the core OS's browser, and allow vendors to distribute the OS with any browser that matches the API. I.e., e.g., no more requirement for IE for their Update services.

          Until they do that (at a minimum), what they're doing is not properly described as "compet
  • This bit of javascript [ntlworld.com] will enable 8-bit alpha for PNGs used in IMG tags. Won't work for PNGs used as backgrounds of objects, but is at least moderately useful, considering that even if they release the fixed version of MSIE today, older versions will persist in large numbers for many years.

Been Transferred Lately?

Working...