[lug] transparent image background
Michael J. Hammel
mjhammel at graphics-muse.org
Fri Aug 25 10:16:17 MDT 2000
Thus spoke D. Stimits
> For all the gimp experts out there, I'm trying to find a way to work
> with transparent backgrounds within images, for web pages. The gimp
> apparently has a means of doing this, although file formats supporting
> it are limited. One such supporting format is gif, but unfortunately, it
> is among the evil commercial doo-hickeys, the doo-hickey class being one
> that the gimp chose to no longer support export of, for legal reasons.
I don't think that's true. It still exports to GIF.
> Can anyone tell me, is there a way with Gimp, or some other linux
> package, to take an image that has a pure black background, and
> something like a logo on it, and make that pure black background a
> transparency that won't block out web page backgrounds that it sits
> over? What file format would I use?
You can use pbmtogif and specify the pixel color to use for transparency.
But Gimp should work for you. Just do the following:
1. Add an alpha channel to the background layer.
2. select the black region with fuzzy select
3. Delete those pixels with Edit->Cut
4. Convert the image to indexed (Image->Mode->Indexed)
5. Save as a GIF file.
I'm using the 1.1.x developers series so the path to the Indexed menu
option is different than the 1.0.4 version currently shipped with most
Linux distributions, but the same process will still work with 1.0.4.
As for other options for transparent images, you don't have any. PNG
supports transparency, but the browsers out right now are marginal in their
support of PNG's transparency features. You could try it, but it's a crap
shoot as to how many visitors would see it the way you want it displayed.
No other image formats supported natively by the browsers have transparency
Michael J. Hammel |
The Graphics Muse | Home is where the house is.
mjhammel at graphics-muse.org | Deep Thoughts, Jack Handey
More information about the LUG