2. ウェブ用の画像の作成

GIMP の主な用途にはウェブサイト用画像の作成があります。 ここでの課題はできるだけ小さなファイル容量を保ちつつ画像をいかに良好に見せるかということです。 この節は、 画像の劣化を最小限にしつつファイル容量の小さな画像を作る方法について順を追って実演します。

2.1. 画像の容量最適化と品質

画像をウェブでも使いやすくするとき肝心なのは、 どんな画像形態とファイル形式にするかということです。 写真は大抵がたくさんの色を持ちとても緻密なので JPEG を使いましょう。 ボタンやアイコンやスクリーンショットのような色が少ない画像には PNG がふさわしい形式です。

  1. まずは、 いつも通り画像を開いてください。 ここには例として我らがウィルバー君の画像をとりあげます。

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

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

  2. この画像は RGB モードに アルファチャンネル が加えられたもの (RGBA) になっています。 普段ウェブ用画像にはアルファチャンネルは不要です。 アルファチャンネルは 画像の統合 で削除できます。

    写真画像にアルファチャンネルがつくことはめったにありませんので、 画像はRGBA モードではなく RGB モードで開かれるはずです。 つまりアルファチャンネルの削除を行う必要はないと考えられます。

    [注記] 注記

    If the image has a soft transition into the transparent areas, you should not remove the alpha channel, since the information used for the transition is not be saved in the file. To export an image with transparent areas that do not have a soft transition, (similar to GIF), remove the alpha channel.

  3. After you have flattened the image, export the image in the PNG format for your web site.

[注記] 注記

You can export your image in the PNG format with the default settings. Always using maximum compression when creating the image. Maximum compression has no effect on image quality or the time required to display the image, but it does take longer to export. A JPEG image, however, loses quality as the compression is increased. If your image is a photograph with lots of colors, you should use jpeg. The main thing is to find the best tradeoff between quality and compression. You can find more information about this topic in 「JPEG 形式に画像をエクスポート」.