2. 画像構造に関連するダイアログ

ここで述べるダイアログは レイヤーチャンネルパス のような画像の構造を制御したり操作します。

2.1. レイヤーダイアログ

図15.1 レイヤーダイアログ

レイヤーダイアログ

The Layers dialog is the main interface to edit, modify and manage your layers.

2.1.1. ダイアログの呼び出し方

バッファーダイアログはドッキング可能です。 その扱い方については 「ダイアログとその合体」 の節をご覧ください。

呼び出し方はつぎのとおりです。

  • from the main menu: WindowsDockable DialogsLayers;

  • from the Tab menu in any dockable dialog by clicking on and selecting Add TabLayers,

  • キーボードショートカット (初期設定) Ctrl+L

In the Windows menu, there is a list of detached windows which exists only if at least one dialog remains open. In this case, you can raise the Layers dialog from the main menu: WindowsLayers.

2.1.2. レイヤーダイアログの利用法

概観

ダイアログ上にはすべてのレイヤーの縮小見本画像が表示されています。 画像の成分が複数のレイヤーに分散している様子はその一覧表示で解ります。 リストの一番上のレイヤーは最初に見えるもの、 そして一番下つまり背景のレイヤーが最後に見えるものです。 一覧表より上の区画には個々のレイヤーを特徴づけるしくみがあります。 一覧表より下の区画にはリストを管理するためのボタンがあります。 レイヤーの見本画像上を 第2ボタン でクリックすると メニュー が開かれます。

Layer list

Each entry in the list is a layer along with its attributes:

レイヤーの可視度

Clicking this icon toggles whether the layer is visible or not. (Shift-clicking on the icon causes all other layers to be hidden.)

透明保護

Clicking on the empty checkbox in the lock column of a layer opens a menu with the following options:

  • Lock pixels: When this toggle button is enabled, you cannot use any brush-based tool (Paintbrush, Pencil, Eraser etc.), the Airbrush or the Ink tool on the currently selected layer. This may be necessary to protect them from unwanted changes.

  • Lock position and size: This toggle button enables or disables protection of layers from moving them around or transforming them. When this is enabled, then you cannot use any transform tool (Rotate, Shear, Perspective and others) or move it.

  • Lock visibility: This toggle button controls the Lock setting for the visibility of the layer. If this is enabled, the layer visibility cannot be changed.

  • Lock alpha channel: This toggle button controls the Lock setting for the transparency of the layer. If this is enabled, the alpha channel for the layer is locked, and no manipulation has any effect on it. In particular, nothing that you do to a transparent part of the layer will have any effect.

図15.2 透明保護の実行例

透明保護の実行例

活性レイヤーには 3 本の水平な不透明の緑色の縞がひかれ、 その背景は透明である。 透明保護 にチェックは入っていない。 不透明部分と透過部分を問わず活性レイヤーにひかれた赤のすじは連続している。

透明保護の実行例

透明保護 にチェックを入れてから活性レイヤーに赤のすじをひいた。 不透明部分のみ赤く塗られている。 透過部分は存続している。


[ヒント] ヒント

レイヤーダイアログでレイヤー名が太字表示されているレイヤーにはアルファチャンネルがありません。

レイヤーのサムネイル

The layer content is represented in a thumbnail. Maintaining left-click for a second on this thumbnail makes it larger. The border color of the layer depends on whether the layer is active or inactive.

レイヤー名

You can change the name of the layer by double-clicking on it. You can also use the Edit Layer Attributes dialog in the context menu that you get by right-clicking on the layer.

[注記] 注記

In the case of an animation layer (GIF or MNG), the name of the layer can be used to specify certain parameters: Layer_name (delay in ms) (combination mode), for example Frame-1 (100 ms) (replace). The delay sets the time during which the layer is visible in the animation. The combination mode sets whether you combine the layer with the previous layer or replace it: the two modes are (combine) or (replace).

レイヤーの特徴

Above the layer list, it is possible to specify some properties for the active layers. The active layers are highlighted. The properties are:

モード

レイヤーのモードはこのレイヤーが他のレイヤーとどのように相互作用するかを定めています。 引き出しメニューより GIMP で利用できるすべてのモードを選んで呼び出せます。 「レイヤーのモード」 でレイヤーのモードを逐一解説しています。

不透明度

このスライダーを動かせばレイヤーの不透明度を増減できます。 不透明度が 0 のときレイヤーは透明で全く見えません。 こことレイヤーマスクとを混同しないようにしましょう。 レイヤーマスクは画素ごとに透明度を設定するものです。

レイヤーの管理

レイヤーの一覧表より下の一連のボタンでレイヤーの一覧表に対する基本的な操作がいくつか行なえます。

Create new layer

Here you can create a new layer. A dialog is opened, which is described in New Layer.

Press the Shift key to open a new layer with last used values.

Create new layer group

Here you can create a new layer group. A new layer is created, where you can put layers down.

Layer groups are described in Layer groups.

レイヤーを一段上に移動

一覧表内でこのレイヤーを一段上に (前面側に) 移動します。 Shift キーを押しながらだと一気に最前面に移動します。

レイヤーを一段下に移動

一覧表内でこのレイヤーを一段下に (背面側に) 移動します。 Shift キーを押しながらだと一気に最背面に移動します。

[ヒント] ヒント

一覧表の底 (最背面) のレイヤーを上に移動するとき、 これが背景レイヤーとなっている場合にはまっさきに透過効果のチャンネル (アルファチャンネルともいう) をそのレイヤーに追加してやる必要があるかもしれません。 その方法は、 背景レイヤーを選択して強調表示させ 第2ボタン クリックすると出てくるメニューの、 アルファチャンネルを追加 を実行です。

Duplicate layers

Here you can create a copy of the selected layers. Name of new layer is suffixed with "copy".

Merge layers レイヤーの固定

Before GIMP-2.10.18, this button was permanently for anchoring. Now, it becomes an anchor only when a floating selection is created (it anchors the floating selection to the previous active layer). Else, it is a Merge layers icon with several possibilities:

  • Merge these layers with the first visible layer below it.

  • Pressing Shift: merge the layer group's layers into one normal layer.

  • Pressing Ctrl: merge all visible layers into one layer.

  • Pressing Shift+Ctrl: merge all visible layers with last used values.

Add masks to layers

Add masks to selected layers.

Select layers by patterns

Select layers by patterns and store layer sets.

Allows you to group layers for operations on more than one layer at a time (for example with the Move tool).

Delete layers

Here you can delete the active layers.

まだまだあるレイヤーの機能

Other functions about layer size are available in the Layer context menu you get by right clicking on the Layer Dialog. You can find them also in the Layer submenu of the main menu.

You will find merging layers functions in the Image main menu.

レイヤーをクリックしてドラッグすると

レイヤーの縮小見本をクリックしたままで待つと、 見本画像が大きくなりマウスでドラッグして移動できるようになります。

  • 一覧表内の他の段 で放つと移動します。

  • ツールボックスまでドラッグして放つ と、 そのレイヤーの複製だけを含んだ新しい画像が作成されます。

  • 他の画像ウィンドウ上までドラッグして放つ と、 その画像の既存のレイヤーの上段にこのレイヤーの複製が加わります。

2.1.3. The Layer dialog context menu

図15.3 Context Menu for the Layers Dialog

Context Menu for the Layers Dialog

By right-clicking in the layer dialog, or by opening the Layers Menu from the tab menu, a context menu for the Layers dialog will open.

Most of the commands in this menu have already been documented above, or elsewhere:

Edit Layer Attributes…

Except for Width, Height, and Fill with, this dialog is the same as the New Layer Dialog. For information about the layer attributes we therefore refer to the documentation for that dialog.

Blend Space submenu

See Blend space in the New Layer dialog.

Composite Space submenu

See Composite space in the New Layer dialog.

Composite Mode submenu

See Composite mode in the New Layer dialog.

Color Tag submenu

See the Color tag documentation in the New Layer dialog.

New Layer, New Layer Group, Duplicate Layer, Merge Down, Anchor Layer, Delete Layer

These commands are explained above, see layer characteristics.

New from Visible

See the New from Visible menu command documentation.

Layer Boundary Size…

See the Layer Boundary Size… menu command documentation.

Layer to Image Size

See the Layer to Image Size menu command documentation.

Scale Layer…

See the Scale Layer… menu command documentation.

Add Layer Masks…, Apply Layer Mask, Delete Layer Mask, Show Layer Masks, Edit Layer Mask, Disable Layer Masks, Masks to Selection

See the Layer Mask submenu documentation for these commands.

Add Alpha Channel, Remove Alpha Channel

Only one of these will be enabled. If the current layer does not have an alpha channel, you will be able to add one. If it does, you can remove the alpha channel.

Merge Visible Layers

This command merges all visible layers into one layer.

Flatten Image

This command merges all layers into one layer and removes transparency.

2.1.4. レイヤーマスク

図15.4 レイヤーマスクを追加ダイアログ

「レイヤーマスクを追加」ダイアログ

概観

A transparency mask can be added to each layer, which defines what parts of the layer are transparent or opaque. We call this a layer mask. A layer mask has the same size and same number of pixels as the layer to which it is attached. Every pixel of the mask can then be coupled with a pixel at the same location in the layer. The mask is a set of pixels in grayscale. The pixels with a value 0 are black and give a full transparency to the coupled pixel in the layer. The pixels with the maximum value (either 1.0 or 255) are white and give full opacity to the coupled pixel in the layer.

To create a layer mask start with a right click on the layer to call the context menu and select Add Layer Masks… in the menu. A dialog appears where you can initialize the content of the mask:

  • 完全不透明(白): ダイアログ上ではマスクが白くなります。 マスクを白く塗るとレイヤーの画素が完全に可視化することから、 この場合、 画像ウィンドウのすべての画素が見えます。 黒でマスクを塗るとレイヤーのその位置は透明になります。

  • 完全透明(黒): ダイアログ上ではマスクが黒くなります。 マスクを黒く塗るとレイヤーの画素が透明になりますから、 この場合レイヤーは完全透過です。 白でマスクを塗るとマスクは剥がれ、 レイヤーの画素が見えるようになります。

  • Layer's alpha channel: the mask is initialized according to the contents of the layer's alpha channel.

  • レイヤーのアルファチャンネルを移転: マスクの初期化は前のオプションと同じですが、 レイヤーのアルファチャンネルが全面的に完全不透明に戻されます。

  • Selection: the mask is initialized according to pixel values found in the current selection.

  • Grayscale copy of layer: the mask is initialized according to a grayscale representation of the pixel values of the layer.

  • チャンネル: 選択マスク を作成しチャンネルダイアログに保管してあれば、 それをレイヤーマスクの初期化に利用できます。

  • Invert mask: This checkbox allows you to invert: black turns to white and white turns to black.

When the mask is created, it appears as a thumbnail next to that of the layer itself. You can select the layer or the mask for editing by clicking on their respective thumbnails. The active item has a white border (which may not be clearly visible when you have a white mask).

When working with masks, it is a good idea to keep the Layers Dialog prominently visible, because you can't see, by looking at the canvas, whether the layer or the mask is active.

Pressing Alt (or Ctrl+Alt and clicking on the layer mask thumbnail) is equivalent to the Show Layer Mask command: the layer mask border turns to green. If you press Ctrl the border is red and the result is equivalent to the Disable Layer Mask command. To return to normal view repeat the last operation. These options are for greater convenience in your work.

レイヤーマスクの例

図15.5 レイヤーマスク付きのレイヤー

レイヤーマスク付きのレイヤー

画像には花が写っている背景レイヤーと、 その上に完全不透明な青いレイヤーがある。 白いレイヤーマスクが青のレイヤーに加えられた。 白いマスクはレイヤーの画素を完全可視化するので、 画像ウィンドウでは依然として青いレイヤーが見えている。


図15.6 レイヤーマスクに描くと

レイヤーマスクに描くと

レイヤーマスクを活性化した。 黒で描くとレイヤーが透過する。 背後のレイヤーが見えるようになる。