On Thu, Aug 6, 2009 at 12:24 PM, Sven Brunken <s...@extjs.com> wrote:

> On 6 Aug., 18:07, John Tamplin <j...@google.com> wrote:
>
> > When you say "good support", what exactly do you mean?  I think it is not
> > practical to support image bundles with transparency in the same manner
> as
> > all the other browsers on IE6.  Various approaches that I know of:
> >
> >    1. *bundling everything into one PNG keeping alpha*
> >    doesn't work in the general case due to memory requirements of the
> alpha
> >    filter, runtime cost of not using filter on IE7
> >    2. *bundling everything into one GIF*
> >    doesn't work in the general case because you only have an 8-bit
> palette
> >    to share between all the images
> >    3. *detect images with transparency and "bundle" them separately*
> >    works, but defeats the point of image bundles (though the user code is
> >    unchanged and works properly on other platforms), runtime cost for
> IE6/7
> >    permutation
> >    4. *encode all transparency as single-bit alpha on IE6
> >    *lose antialiasing, keep extra image bundles just for IE, runtime cost
> >    for IE6/IE7 permutation
> >
> > We are currently at #1, without runtime detection of IE7.  Fixing that is
> > relatively easy.  #2 seems a non-starter, though it could be useful for
> > specific cases where palettes are small -- still since it isn't a general
> > solution it doesn't seem worthwhile.  #3 seems straightforward and will
> > continue to work but loses the benefit of image bundles on IE6.  #4,
> > assuming I am remembering correctly that IE6 does support single-bit
> alpha
> > in PNGs, seems the best compromise but the most work.
>
> With good support I mean transparency support without consuming that
> much of memory for each image.
>
> Point 3 is what I thought of. If a user defines a GIF image as source,
> we don’t bundle it for IE6/7. We just handle it as we are handling the
> animated images. If the user however defines a PNG image or JPEG image
> than he would have the real bundle and needs to add the filters (only
> for PNG). The only change would be that if you have a GIF image it
> would not be transformed and bundled for the ie6 deferred binding.
> With this approach we don’t loose any quality of the original image.
> We would use the real imagebundle for everything that is not a GIF
> image. GIF images would be served as standalone image. But looking
> into the gain you get from this (memory usage and application speed)
> this is the way to go (in my opinion).


If we want to support IE6 fully (which I hate having to do, but it's hard to
argue with the fact that it still account for ~20% of the market, depending
upon whose stats you use), then I think this is basically the only approach
that will work. We all agree that the DirectX filter is far too memory
hungry, especially on the old machines that are often still running IE6.
Bundling images with disparate palettes into a single 8-bit image is far too
unpredictable, which seems pretty unacceptable to me. So I will argue that
we should, on IE6:
- Leave GIFs alone.
- Turn PNGs with transparency into GIFs.
  - Open question: How should we clamp the [0, 255] alpha channel to [0, 1]?
- Bundle only those images without transparency into PNGs.
- Stop using the DirectX filter altogether.

Does anyone have any really strong objection to this approach? It will add
some extra requests on IE6 under some circumstances, but that's got to be
better than either (a) completely mangling bundled images, or (b) blowing
massive amounts of memory.

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to