2. Dialoger relateret til billedstruktur

De efterfølgende dialoger lader dig kontrollere og manipulere billedstrukturer såsom lag, kanaler eller kurver.

2.1. Dialogen Lag

Figur 15.1. Dialogen Lag

Dialogen Lag

Dialogen Lag er hovedgrænsefladen til at redigere, ændre og administrere dine lag.

2.1.1. Aktivér dialogen

Dialogen kan dokkes. Se hvordan i afsnittet Afsnit 2.3, “Dialoger og dokning”.

Du kan tilgå den:

  • from the main menu: WindowsDockable DialogsLayers;

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

  • eller med tastaturgenvejen 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. Using the Layers Dialog

Overblik

Every layer appears in the dialog in the form of a thumbnail. When an image has multiple layers as components, they appear as a list. The upper layer in the list is the first one visible, and the lowest layer the last visible, the background. Above the list one can find characteristics related individually to each layer. Under the list one can find management buttons for the layer list. A right-click on a layer thumbnail opens the Layer context menu.

Selecting multiple layers

GIMP allows you to select multiple layers and perform actions on them. You can e.g. move them to a different location in the layer stack, scale them, etc. Selecting multiple layers is done by using the mouse and Shift key, for adding a range of layers, or Ctrl key, for adding or removing the clicked layer.

Be aware that certain actions can only be done on a single layer. If you try to use such an action, e.g. using the paintbrush, a warning message will show up telling you that you can't do that and that you have to select a single layer.

Layer list header

Directly above the layer list is the header bar. On the left are three icons that show which column is used for visibility, lock, and layer effects. In the middle a text label will tell you how many layers are currently selected if it is more than one. On the right you see a search icon. Clicking in this part opens a search dialog where you can search for layers.

Search layers and Saved searches

Searching layers can be useful if you have a lot of layers in your project. As soon as you start typing in the search bar, it will start finding layers that match your search and select them. Multiple layers will be selected if they all match.

Below the search bar you will see a plus icon. Clicking this allows you to add the current search as a new named set. This search, and previously defined ones, will show up below the search bar. Clicking one of these saved searches will select all the layers matching the search term. Each saved search has a close icon in the right corner, which can be used to remove that saved search.

Layer list

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

Synlighed af laget

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

Lås

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

Lås 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 allows you to protect them from unwanted changes.

Lås placering og størrelse

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.

Lås alfakanal

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.

Figur 15.2. Eksempel på låst alfakanal

Eksempel på låst alfakanal

Det aktive lag har tre vandrette, uigennemsigtige, grønne striber på en gennemsigtig baggrund. Vi maler en lodret rød stribe. Lås ikke markeret: Uigennemsigtige og gennemsigtige områder af det aktive lag males med rødt.

Eksempel på låst alfakanal

Lås aktiveret: Kun uigennemsigtige områder af det aktive lag males med rødt. Gennemsigtige områder bevares.


[Vink] Vink

If a layer name in the Layers dialog is in bold, then this layer has no Alpha channel.

Layer Effects

When this icon is visible, there are Layer Effects present for this layer. Clicking it will open a dialog where you will see a list of all effects added to this layer. For each effect you can change the visibility, the order of the effects, merge all effects with the layer, or remove them.

Layer Effects are filters that change the layer non-destructively, that is, they can be added, removed or changed without changing the layer itself. They instead add effects on top of the layer.

A lot of the GEGL filters in the Colors and Filters menu can be used this way. The layer effects dialog consists of the following parts:

Layer Effects List

At the top there is a list of all layer effects that have been added to this layer. Note that the effects are applied on top of the layer starting with the effect at the bottom of the list.

To the left of each effect you can see an eye icon; which can be clicked to hide or show that specific effect. Next to that is the Filter effect icon.

Buttons to manage the Layer Effects

Below the list of effects you will see a row of buttons that can be used to manipulate the effects in the list.

Layer Effects Visibility

This toggle button controls the visibility setting for all the effects of the layer. By default all effects are visible. Clicking this hides the effects, allowing you to see the actual pixel contents of the layer.

Edit the selected filter

This button allows you to open the dialog of the selected layer effect to make changes to its settings. Alternatively you can also double click on the layer effect in the list to open the dialog.

Raise layer effect

Here you can move the layer effect up in the list.

Lower layer effect

Here you can move the layer effect down in the list.

Merge all active filters

This button lets you merge all active (visible) layer effects with the contents of the layer. This removes the layer effects from the layer after the effects have been applied to the layer.

Remove the selected filter

This button removes the selected layer effect.

Lagminiature

The layer content is represented by 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.

Lagnavn

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.

[Bemærk] Bemærk

Hvis der er tale om et animationslag (GIF eller MNG), kan lagets navn bruges til at angive visse parametre: Lag_navn (visningstid i ms) (kombinationstilstand), for eksempel Billede-1 (100 ms) (erstat). Visningstid indstiller den tid, hvor laget er synligt i animationen. Kombinationstilstanden angiver, om du vil kombinere laget med det forrige lag eller erstatte det: De to tilstande er (kombinér) eller (erstat).

Lagkarakteristika

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

Tilstand

Lagtilstanden bestemmer, hvordan laget interagerer med de andre lag. I kombinationsboksen får du adgang til alle de tilstande, som GIMP tilbyder. Lagtilstandene er udførligt beskrevet i Afsnit 2, “Lagtilstande”.

Uigennemsigtighed

Ved at flytte skyderen bliver laget mere eller mindre uigennemsigtigt. Med en værdi på 0 er laget gennemsigtigt og helt usynligt. Forveksl ikke dette med en lagmaske, som indstiller gennemsigtigheden pixel for pixel.

Håndtering af lag

Under laglisten er der et sæt knapper, som giver dig mulighed for at udføre nogle grundlæggende handlinger på laglisten.

Create new layer

Her kan du oprette et nyt lag. Der åbnes en dialog, som er beskrevet i Nyt lag.

Tryk på tasten Skift for at åbne et nyt lag med de sidst anvendte værdier.

Create new layer group

Her kan du oprette en ny laggruppe. Der oprettes et nyt lag, hvor du kan lægge lag ind i.

Laggrupper er beskrevet i Laggrupper.

Hæv lag

Her kan du flytte laget et niveau op på listen. Tryk på tasten Skift for at flytte laget til toppen af listen.

Sænk lag

Her kan du flytte laget et niveau ned på listen. Tryk på tasten Skift for at flytte laget til bunden af listen.

[Vink] Vink

For at flytte et lag nederst på listen kan det være nødvendigt først at tilføje en gennemsigtighedskanal (også kaldet alfakanal) til baggrundslaget. For at gøre dette skal du højreklikke på baggrundslaget og vælge Tilføj alfakanal i menuen.

Duplicate layers

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

Sammenlæg lag Forankr lag

The Anchor layer button is only visible when a floating selection is present. It anchors the floating selection to the previous active layer.

When there is no floating selection, the Merge layers icon is shown, with several possibilities:

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

  • Tryk på Skift: Læg laggruppens lag sammen til ét normalt lag.

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

  • Tryk på Skift+Ctrl: Læg alle synlige lag sammen med de sidst anvendte værdier.

Add masks to layers

Add masks to selected layers.

Delete layers

Here you can delete the selected layers.

Funktioner til flytning af lag

Other functions about layer size are available in the Layer context menu you get by right clicking on the Layers 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.

Klik-og-træk lag

Click and hold on layer thumbnail or layer name: the thumbnail enlarges and you can move it by dragging the mouse. Selecting and moving multiple layers is also possible.

  • So you can place this layer or layers somewhere else in the layer list.

  • You can also drop the layer into the Toolbox: a new image is created that contains this layer only. This does not work with multiple selected layers.

  • Finally, you can drop the layer into another image: this layer will be added to the layer list, above existing layers.

2.1.3. The Layers dialog context menu

Figur 15.3. Genvejsmenuen til dialogen Lag

Genvejsmenuen til dialogen Lag

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

De fleste kommandoer i denne menu er allerede blevet dokumenteret ovenfor eller andre steder:

Redigér lagegenskaber …

Bortset fra Bredde, Højde og Udfyld med er denne dialog den samme som Nyt lag. For information om lagegenskaberne henviser vi derfor til dokumentationen for denne dialog.

Undermenuen Blanderum

Se Blanderum i dialogen Nyt lag.

Undermenuen Sammensætningsrum

Se Sammensætningsrum i dialogen Nyt lag.

Undermenuen Sammensætningstilstand

Se Sammensætningstilstand i dialogen Nyt lag.

Undermenuen Farvemærkat

Se Farvemærkat i dialogen Nyt lag.

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

Disse kommandoer er forklaret ovenfor, se lagegenskaber.

Nyt fra synlig

Se dokumentationen til menukommandoen Nyt fra synlig.

Lagets kantstørrelse …

Se dokumentationen til menukommandoen Lagets kantstørrelse ….

Layers to Image Size

See the Layers to Image Size menu command documentation.

Skalér lag …

Se dokumentationen til menukommandoen Skalér lag ….

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

Se dokumentationen til undermenuen Lagmaske.

Tilføj alfakanal, Fjern alfakanal

Kun én af disse vil være aktiveret. Hvis det aktuelle lag ikke har en alfakanal, kan du tilføje en. Hvis det har, kan du fjerne alfakanalen.

Sammenlæg synlige lag

Denne kommando lægger alle synlige lag sammen til ét lag.

Sammenlæg billedets lag (fjern gennemsigtighed)

Denne kommando lægger alle lag sammen til ét lag og fjerner gennemsigtigheden.

2.1.4. Lagmasker

Figur 15.4. Dialogen Tilføj lagmaske

Dialogen “Tilføj lagmaske”

Overblik

Der kan tilføjes en gennemsigtighedsmaske til hvert lag, som definerer, hvilke dele af laget der er gennemsigtige eller uigennemsigtige. Vi kalder dette en lagmaske. En lagmaske har samme størrelse og samme antal pixels som det lag, den er knyttet til. Hver pixel i masken kan så kobles sammen med en pixel på samme sted i laget. Masken er et sæt pixels i gråtoner. Pixlerne med værdien 0 er sorte og giver fuld gennemsigtighed til den koblede pixel i laget. Pixlerne med den maksimale værdi (enten 1,0 eller 255) er hvide og giver fuld uigennemsigtighed til den koblede pixel i laget.

For at oprette en lagmaske skal du højreklikke på laget for at åbne genvejsmenuen og vælge Tilføj lagmaske … i menuen. En dialog vises, hvor du kan initialisere maskens indhold:

  • White (full opacity): the mask is white in the Layers dialog. So, all pixels of the layer are visible in the image window since painting the mask with white makes layer pixels fully visible. You will paint with black to make layer pixels transparent.

  • Black (full transparency): the mask is black in the Layers dialog. So, the layer is fully transparent since painting the mask with black makes layer pixels transparent. Painting with white will remove the mask and make layer pixels visible.

  • Lagets alfakanal: Masken initialiseres i henhold til indholdet af lagets alfakanal.

  • Overfør lagets alfakanal: Gør det samme som den forrige mulighed, bortset fra at den også nulstiller lagets alfakanal til fuld uigennemsigtighed.

  • Markering: Masken initialiseres i henhold til de pixelværdier, der findes i den aktuelle markering.

  • Gråtonekopi af lag: Masken initialiseres i henhold til en gråtonerepræsentation af lagets pixelværdier.

  • Channel: The layer mask is initialized with a selection mask you have created before, stored in the Channels dialog.

  • Invertér maske: Dette afkrydsningsfelt giver dig mulighed for at invertere masken: sort bliver til hvid, og hvid bliver til sort.

Når masken er oprettet, vises den som en miniature ved siden af selve laget. Du kan vælge laget eller masken til redigering ved at klikke på deres respektive miniaturer. Det aktive element har en hvid kant (som måske ikke er helt synlig, når du har en hvid maske).

Når du arbejder med masker, er det en god idé at holde dialogen Lag synlig, fordi du ikke kan se på lærredet, om laget eller masken er aktiv.

Hvis du trykker på Alt (eller Ctrl+Alt og klikker på lagmaskens miniature), svarer det til kommandoen Vis lagmaske: Lagmaskens kant bliver grøn. Hvis du trykker på Ctrl, bliver kanten rød, og resultatet svarer til kommandoen Deaktivér lagmaske. For at vende tilbage til normal visning skal du gentage den sidste handling. Disse muligheder er til for at gøre dit arbejde mere bekvemt.

Eksempel på lagmaske

Figur 15.5. Et lag med lagmaske

Et lag med lagmaske

Dette billede har et baggrundslag med en blomst og et andet blåt lag, der er helt uigennemsigtigt. Der er tilføjet en hvid lagmaske til det blå lag. I billedvinduet forbliver det blå lag synligt, fordi en hvid maske gør lagets pixels synlige.


Figur 15.6. Mal lagmasken

Mal lagmasken

Lagmasken er aktiv. Du maler med sort farve, hvilket gør laget gennemsigtigt: Det underliggende lag bliver synligt.