From: John B. <jb...@ac...> - 2005-09-02 05:32:55
|
I split the subject because I feel that discussions about HTML browsers and discussions about the right way to write applications mix like oil and water. From: Greg Roelofs >Well, [MSIE is] at least changed sufficiently that alpha is now natively >supported in 7.0, which is pretty fundamental from the PNG perspective. ;-) > >But gamma handling displays the same weird 1.96 (or 1.93) bug/"feature" >that much older versions had, and there's no apparent sign of ICC/GDI+ >support. Hum. As I remember it in 1996 or thereabouts we had a big discussion/argument about the right way to interpret the gAMA chunk. Drafts of the PNG specification from before the conclusion of that discussion recommend use of a 1.13 'viewing correction', drafts after it avoid that and say that a typical CRT should be considered as having a gamma of 2.2 and require no viewing correction - so the corresponding gAMA chunk value (about 0.45 - 1/2.2) requires no (additional) gamma correction. For those who don't know 2.2/1.13 = 1.95 The original MSIE PNG implementation was written to a pre-conclusion draft. It's a bug in MSIE, albeit an entirely understandable one. So long as MSIE displays PNG images with that gamma behaviour I will believe that it's still using that code from 1996 even though I've never actually seen the code. The alpha blending issue in MSIE is the same as that in any application from the mid 1990's written for a consumer level OS - the OS did not support alpha blending! So the application got to do it itself, and it is impossible if the target surface is not readable. I believe at the time MSIE had an internal architecture which demanded incremental rendering of objects but did not permit the result to have alpha - painter's model, a pixel either gets coloured or it stays unchanged. Of course that can be fixed now (in Windows either with DirectX or with GDI+, or both since GDI+ will use DirectX IIRC), however fixing alpha blending, even using GDI+, does not obligate the fixor to also change the bitmap reading code to pass PNG bits straight to GDI+. Ok, I just deleted the rant, it's obvious. I still believe that browsers are neither typical nor representative - that application authors in general can get it right and will get it right so long as the OS/library API permits (perhaps encourages) this to happen. John Bowler <jb...@ac...> |