2.3. 透過画像の保存

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 形式はあまり使われません。 GIF のすべての機能とそれ以上の (アルファ透過などの) 性能を PNG があわせもつからです。 とはいえ、 アニメーションのためにこの形式もまだ使われています。

手順6.1 透明部分のある画像の作成 (アルファ透過)

  1. まずは GIMP のマスコット、 ウィルバー君の前回演習に使ったのと同じ絵を使いましょう。

    図6.4 RGBA モードで開かれたウィルバー君の画像

    RGBA モードで開かれたウィルバー君の画像

  2. 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 channel 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; Layer+TransparencyAdd Alpha Channel.

  3. XCF 形式の画像は初期状態では背景レイヤーがついてきますがこれは削除できます。 GIMP にはグラデーション作成をサポートする標準的なフィルターが付属しています。 画像ウィンドウのメニューより フィルター照明と投影 サブメニュー内を探してみましょう。 ここはあなたの想像力次第です。 アルファ透過の効果の実演として、 ウィルバー君の背後に後光をつけました。

  4. After you're done with your image, you can export it in PNG format.

図6.5 透過効果つきのウィルバー像

透過効果つきのウィルバー像

Mid-Tone Checks in the background layer represent the transparent region of the exported image while you are working on it in GIMP.