2. Diálogos relacionados a estrutura da imagem

Os diálogos seguintes permitem com que você controle e manipule as estruturas da imagem, tais como camadas, canais, ou vetores.

2.1. Diálogo de camadas

Figura 15.1. Diálogo de camadas

Diálogo de camadas

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

2.1.1. Ativando o diálogo

O diálogo de Buffers é um diálogo de encaixe;veja a seção Seção 2.3, “Caixas de diálogo e de encaixe” para mais informações sobre como gerenciá-lo.

Você pode acessa-lo:

  • from the main menu: WindowsDockable DialogsLayers;

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

  • Do atalho de teclado padrão 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. Usando o diálogo de camadas

Visão geral

Cada camada aparece no diálogo na forma de uma miniatura. Quando uma imagem tem múltiplas camadas como componentes, elas aparecem como uma lista. A camada que está no algo da lista é a primeira que é visível, e a mais embaixo é a última visível, atrás de todas. Acima da lista, pode-se ver características relacionadas a cada camada individual - elas são atualizadas para mostrar as propriedades da camada selecionada. Abaixo da lista, há botões de controle para a lista de camadas. Um clique com om o botão direito na miniatura de uma camada abre o menu de contexto de Camadas

Layer list

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

Visibilidade da camada

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

Travar

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.

Figura 15.2. Exemplo de travamento do canal alfa

Exemplo de travamento do canal alfa

A camada ativa tem três listas verdes opacas na horizontal, sobre um fundo transparente. Nós pintamos uma faixa vermelha vertial. Com a trava desligada: tanto os pixels opacos como transparentes são pintados de vermelho.

Exemplo de travamento do canal alfa

Trava ligada: somente as áreas opacas da camada ativa são pintadas com vermelho. As áreas transparentes são preservadas.


[Dica] Dica

Se um nome de camada no diálogo de camadas estiver em negrito, então essa camada não tem um canal Alfa.

Miniatura da camada

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.

Nome da camada

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.

[Nota] Nota

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).

Características das camadas

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

Modo

O modo de camada determina como a camada interage com as demais. A partir dessa lista, você pode acessar todos os modos de camada disponíveis no GIMP. Os modos de camada estão descritos em detalhes em Seção 2, “Modos de Camada”.

Opacidade

Ao mover o controle deslizante, você pode dar mais ou menos transparência para a camada. Com um valor de opacidade 0, a camada se torna transparente e completamente invisível. Não confunda isso com a máscara de camadas, que permite que se atribua valores de transparência para cada pixel, nem com a visibilidade da camada, que liga ou desliga a camada como um todo, nem com valores de transparência no canal alfa.

Gerenciamento de camadas

Abaixo da lista de camadas, há uma série de botões que permite a você realizar algumas operações básicas com a lista de camadas.

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.

Subir camada

Aqui você pode mover a camada um nível para cima na lista. Pressione a tecla Shift ao a pertar o botão para mover a camada para o topo da lista ou grupo.

Abaixar camada

Neste botão, você pode mover a camada um nível para baixo na lista. Pressione a tecla Shift ao apertar o botão para movê-la para o fundo da lista ou grupo.

[Dica] Dica

Pode ser que uma camada não tenha canal alfa, nesse caso, você ficará impedido de ter áreas transparentes na mesma. Se for o caso, adicione um canal alfa acionando o menu de contexto das camadas e escolhendo a opção Adicionar canal alfa.

Duplicate layers

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

Merge layers Ancorar camada

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.

Mais funcionalidades de camadas

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.

Clicando e arrastando camadas

Clique e segure o botão pressionado sobre uma miniatura de camada: ele aparece em tamanho aumentado, e você pode arrastá-lo movendo o mouse.

  • Então você pode soltar essa camada em algum outro ponto na lista de camadas, ou mesmo dentro de um grupo.

  • Você também pode arrastar a camada até a caixa de Ferramentas: será criada uma nova imagem que contém apenas a camada arrastada.

  • E finalmente, você pode arrastar a camada até uma outra imagem: essa camada será adicionada como uma camada a lista de camadas da outra imagem, acima das camadas existentes.

2.1.3. The Layer dialog context menu

Figura 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. Máscaras de camada

Figura 15.4. o diálogo de Adicionar máscara

o diálogo de “Adicionar máscara”

Visão geral

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:

  • Branca (opacidade total): A máscara aparece como branca no diálogo de camadas. Portanto, todos os pixels na camada são visíveis, uma vez que a cor branca na máscara deixa os pixels totalmente visíveis. Você agora poderá pintar a máscara com preto para tornar as partes desejadas transparentes.

  • Preta (transparência total): A máscara aparece como preta no diálogo de camadas.. Logo, a camada é completamente transparente, uma vez que pintar a cor preta na máscara deixa os pixels transparentes. Ao pintar essa máscara com partes brancas, ou mais claras, as áreas correspondentes se tornarão visíveis.

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

  • Transfere o canal alfa da camada: Faz o mesmo que a operação anterior, no entanto, redefine o canal alfa da camada para opacidade completa. Desse modo, a transparência total da camada não é alterada, em nenhuma área.

  • 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.

  • Canal: a máscara da camada é inicializada com o conteúdo de um canal de máscara que você tenha criado previamente, acessível na imagem a partir do diálogo de canais.

  • 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.

Exemplo de máscara de camada

Figura 15.5. Uma camada com uma máscara de camada

Uma camada com uma máscara de camada

Essa imagem tem uma camada de fundo com uma flor, e uma outra camada azul, completamente opaca. Uma máscara de camada branca foi adicionada à camada azul. Na janela de imagem, a camada azul permanece visível por que a máscara branca torna os pixels da camada visíveis.


Figura 15.6. Pintando na máscara de camada

Pintando na máscara de camada

A máscara da camada está ativa. Você pinta na mesma com a cor preta, que torna os pixels correspondentes na imagem transparentes: a imagem abaixo aparece.