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.
注意 | |
---|---|
GIF 格式很少使用,因为 PNG 支持 GIF 的所有功能以及附加功能(例如,alpha 透明度)。尽管如此,GIF 仍然用于动画。 |
过程 6.1. 创建具有透明区域(Alpha 透明度)的图像
首先,我们将使用与之前教程中相同的图像,即 GIMP 吉祥物 Wilber。
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; + → .
原始 XCF 文件包含您可以删除的背景层。GIMP带有支持创建渐变的标准滤镜;查看
+ 。你只受你的想象力的限制。为了演示 alpha 透明度的功能,在 Wilber 周围背景中显示了柔和光晕。After you're done with your image, you can export it in PNG format.