Dov Kruger ([EMAIL PROTECTED]) wrote:
> massive bandwidth reduction on our forecast website, see
> for the original, and
> for the
> experimental transparent version.

Sorry, these are two pages which have exactly the same image embedded.

> We currently execute a script-fu that turns all white pixels
> transparent, then turns the 24-bit-per-pixel image into indexed mode
> with 255 colors, setting color 0 transparent. It seems to take
> I suspect that color-to-alpha is the slow part. Is there anything we can
> do to speed this up, like convert the image to indexed, and just make
> color 0 transparent?

color-to-alpha indeed is computationally complex, because it not only
makes the color picked transparent, but also pushes as much transparency
as possible into all pixels, so that they appear the same as the
original, when the extracted color gets composed behind it.

And then you destroy this by indexing the image, where gimp no longer
supports partial transparency...  :-)

> Any help with code to programmatically make color
> entry n transparent would be great, we didn't find any reference to
> that.

Ok, I suspect that you'll save a lot of bandwidth by simply indexing the
image to e.g. 64 colors or so, the fiddeling with transparency probably
doesn't save you anything. And just indexing is probably way quicker by
using a standalone commandline tool.

However, if you want to make e.g. all white pixels transparent you could
index the image and then invoke gimp-by-color-select with appropriate
parameters, and then select edit->clear (make sure to add an alpha
channel if no one exists yet).

I hope this helps,
              [EMAIL PROTECTED]    
Gimp-developer mailing list

Reply via email to