There are two different approaches used by graphic file formats for supporting transparent image areas: simple binary transparency and alpha transparency. Simple binary transparency is supported in the GIF format; one color from the indexed color palette is marked as the transparent color. Alpha transparency is supported in the PNG format; the transparency information is stored in a separate channel, the Alpha channel.
Opomba | |
---|---|
The GIF format is rarely used because PNG supports all the features of GIF with additional features (e.g., alpha transparency). Nevertheless, GIF is still used for animations. |
Postopek 6.1. Izdelava slik s prosojnimi območji (alfa-prosojnost)
Uporabili bomo isto sliko kot v prejšnjih primerih, t.j. sliko Wilberja, maskote programa GIMP.
To export an image with alpha transparency, you must have an alpha channel. To check if the image has an alpha channel, go to the Channels Dialog and verify that an entry for “Alpha” exists, besides Red, Green and Blue. If this is not the case, add a new alpha channel from the layers menu; + → .
The original XCF file contains background layers that you can remove. GIMP comes with standard filters that supports creating gradients; look under
+ . You are only limited by your imagination. To demonstrate the capabilities of alpha transparency, a soft glow in the background around Wilber is shown.After you're done with your image, you can export it in PNG format.