2. Finestre relative alla struttura dell'immagine

I seguenti pannelli permettono di controllare e gestire le strutture dell'immagine, come i livelli, i canali o i tracciati.

2.1. Finestra livelli

Figura 15.1. Finestra livelli

Finestra livelli

La finestra di dialogo «Livelli» è la principale interfaccia per modificare e gestire i livelli.

2.1.1. Attivazione della finestra

Questa finestra di dialogo è di tipo agganciabile; vedere la sezione sulle Finestre agganciabili per le istruzioni su come gestire questo tipo di finestre.

È accessibile:

  • from the main menu: WindowsDockable DialogsLayers;

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

  • attraverso la combinazione di tasti (predefinita): 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. Uso del pannello «livelli»

Panoramica

In questa finestra ogni livello viene rappresentato da una miniatura. Quando un'immagine è composta da elementi disposti su più livelli, questi vengono visualizzati come una lista. Il livello che si trova più in alto nella lista è il primo ad essere visibile, quello più in basso è lo sfondo, che è l'ultimo livello ad essere visibile. Sopra alla lista si trovano delle proprietà relative ad ogni singolo livello. Al di sotto della lista si trovano i pulsanti che permettono di gestire la lista dei livelli. Facendo un clic con il tasto destro sulla miniatura di un livello si apre il menu dei livelli.

Layer list

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

Visibilità livello

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

Blocca

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. Esempio di blocco del canale alfa

Esempio di blocco del canale alfa

Il livello attivo ha tre strisce orizzontali, opache e verdi su uno sfondo trasparente. Disegnamo una striscia rossa verticale. «Blocco» non impostato: le aree opache e trasparenti del livello attivo vengono disegnate di rosso.

Esempio di blocco del canale alfa

«Bloccato» spuntato: solo le aree opache del livello attivo vengono dipinte di rosso. Le aree trasparenti vengono preservate.


[Suggerimento] Suggerimento

Se un nome di livello nel pannello dei livelli è in grassetto, allora questo livello non possiede un canale alfa.

Miniatura del livello

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 livello

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

Proprietà dei livelli

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

Modalità

La modalità determina come il livello interagisce con gli altri livelli. Dal menu a discesa si può accedere a tutte le modalità messe a disposizione da GIMP. Le modalità dei livelli sono descritte in dettaglio in Sezione 2, «Modalità del livello».

Opacità

Spostando la barra di scorrimento si conferisce una maggiore o minore opacità al livello. Con un valore di opacità pari a 0 il livello è trasparente e completamente invisibile. Non va confusa con la maschera di livello che imposta la trasparenza pixel per pixel.

Gestione dei livelli

Al di sotto della lista un insieme di pulsanti permette di eseguire alcune operazioni basilari sui livelli.

Create new layer

Qui è possibile creare un nuovo livello. Si apre una finestra di dialogo, la cui descrizione si trova in Nuovo livello.

Premere il tasto Maiusc per aprire un nuovo livello preimpostato con valori usati più recentemente.

Create new layer group

Da qui si può creare un nuovo gruppo di livelli. Viene creato un nuovo livello, dove è possibile depositare i livelli.

I gruppi di livelli sono descritti in Gruppi di livelli.

Alza il livello

Da qui è possibile spostare in su il livello all'interno della lista. Tenendo premuto il tasto Maiusc il livello verrà spostato in cima alla lista.

Abbassa il livello

Da qui è possibile spostare in giù il livello all'interno della lista. Tenendo premuto il tasto Maiusc il livello verrà spostato in fondo alla lista.

[Suggerimento] Suggerimento

Prima di poter spostare un livello in fondo alla lista, potrebbe essere necessario aggiungere al livello di sfondo il canale della trasparenza (chiamato anche canale alfa). Per fare ciò si deve fare clic con il tasto destro sul livello di sfondo e scegliere aggiungi canale alfa dal menu.

Duplicate layers

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

Fondi livelli Ancora livello

Prima di GIMP-2.10.18, questo pulsante era permanentemente per l'ancoraggio. Ora, esso diventa un'àncora solo quando viene creata una selezione fluttuante (esso àncora la selezione fluttuante al livello attivo precedente). Altrimenti, è un'icona Fondi livelli con diverse possibilità:

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

  • Premendo Maiusc: fonde i livelli del gruppo di livelli in un livello normale.

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

  • Premendo Maiusc+Ctrl: fonde tutti i livelli visibili con gli ultimi valori usati.

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.

Altre funzioni dei livelli

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.

Clic e trascinamento dei livelli

Facendo clic sulla miniatura di un livello e mantenendo premuto il pulsante del mouse si ingrandisce la miniatura e la si può trascinare.

  • In questo modo è possibile spostare il livello altrove all'interno della lista.

  • È possibile anche rilasciare il livello sulla barra degli strumenti: in questo modo viene creata una nuova immagine che contiene solo questo livello.

  • Infine, si può rilasciare il livello in un'altra immagine: in questo modo il livello viene aggiunto alla lista dei livelli sopra a quelli esistenti.

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. Maschere di livello

Figura 15.4. La finestra di dialogo «Aggiungi maschera»

La finestra di dialogo «Aggiungi maschera»

Panoramica

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:

  • Bianco (totale opacità): la maschera non ha effetto, tutti i pixel del livello sono completamente visibili. Si deve dipingere con il colore nero per rendere i pixel trasparenti.

  • Nero (totale trasparenza): la maschera fornisce una completa trasparenza al livello che diventa invisibile. Dipingendo con il colore bianco si rimuove la maschera e si rendono i pixel del livello visibili.

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

  • Trasferimento canale alfa del livello: esegue la stessa operazione della voce precedente eccetto il fatto che inizializza anche il canale alfa del livello a totale opacità.

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

  • Canale: il livello maschera è inizializzato con una maschera di selezione che si è creata in precedenza, memorizzata nel pannello dei canali.

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

Esempio di maschera di livello

Figura 15.5. Un livello con una maschera di livello

Un livello con una maschera di livello

Questa immagine ha un livello di sfondo con un fiore ed un altro livello completamente blu. Una maschera di livello bianca è stata aggiunta al livello blu. Nella finestra immagine il livello blu rimane visibile poiché una maschera di livello bianca lo rende tale.


Figura 15.6. Disegnare la maschera di livello

Disegnare la maschera di livello

La maschera di livello è attivata. Disegnando con il colore nero, che rende il livello trasparente, si rende visibile il livello sottostante.