Turinys
You can think of layers as a stack of slides. Using layers, you can construct an image of several conceptual parts, each of which can be manipulated without affecting any other part of the image. Layers are stacked on top of each other. The bottom layer is the background of the image, and the components in the foreground of the image come above it.
There is no limit, in principle, to the number of layers an image can have: only the amount of memory available on the system. It is not uncommon for advanced users to work with images containing dozens of layers. You can group layers to make your work easier, and you have many commands to handle layers.
The organization of layers in an image is shown by the Layers dialog, which is the second most important type of dialog window in GIMP, after the Main Toolbox. The appearance of the Layers dialog is shown in the adjoining illustration. How it works is described in detail in the Layers Dialog section, but we will touch on some aspects of it here, in relation to the layer properties that they display.
Each open image has at any time a single active drawable. A „drawable“ is a GIMP concept that includes layers, but also several other types of things, such as channels, layer masks, and the selection mask. (Basically, a „drawable“ is anything that can be drawn on with painting tools). If a layer is currently active, it is shown highlighted in the Layers dialog, and its name is shown in the status area of the image window. If not, you can activate it by clicking on it. If none of the layers are highlighted, it means the active drawable is something other than a layer.
In the menu bar above an image window, you can find a menu called , containing a number of commands that affect the active layer of the image. The same menu can be accessed by right-clicking in the Layers dialog.
Kiekvienas paveikslėlio sluoksnis turi kelias svarbias savybes:
Kiekvienas sluoksnis turi pavadinimą. Sukūrus sluoksnį jis priskiriamas automatiškai, tačiau jį galite pakeisti. Tą galite padaryti du kartus spustelėję sluoksnį dialoge Sluoksniai arba ten pat jį spustelėję dešiniuoju pelės mygtuku ir atsiradusiame meniu pasirinkę viršutinį įrašą .
Kaip buvo paaiškinta ankstesniojoje sekcijoje, alfa kanalas užkoduoja informaciją, nurodančią kiek permatomas yra sluoksnis kiekviename pikselyje. Tai matoma dialoge Kanalai: balta spalva yra visiškas nepermatomumas, juoda spalva yra permatomumas, o pilki lygiai yra dalinis permatomumas.
The background layer is particular. If you have just created a new image, it has still only one layer which is a background layer. If the image has been created with an opaque Fill type, this one layer has no Alpha channel. To get a background layer with transparency, either you create your new image with a transparent Fill type, or you use the Add an Alpha Channel.
If you add a new layer, even with an opaque Fill type, an Alpha channel is automatically added to the layer.
Visuose paveikslėlio sluoksniuose – išskyrus apatinį – yra Alfa kanalas, tačiau alfa reikšmės yra nematomos. Daugiau informacijos apie Alfa galite rasti glosarijuje.
Pav. 8.2. Alfa kanalo pavyzdys: elementarus paveikslėlis
Šiame paveikslėlyje yra trys sluoksniai nupiešti su 100% nepermatomomis spalvomis: raudona, žalia, mėlyna. Dialoge Kanalai galite matyti, kad buvo pridėtas alfa kanalas. Jis yra baltas, nes šis paveikslėlis yra ne permatomas, kadangi yra bent vienas 100% nepermatomas sluoksnis. Dabartinis sluoksnis yra raudonas: kadangi jis nudažytas gryna raudona spalva, nėra žalios ir mėlynos, o atitinkami kanalai yra juodi..
Pav. 8.3. Alfa kanalo pavyzdys: vienas permatomas sluoksnis
Kairioji pirmo sluoksnio dalis buvo padaryta permatoma (Stačiakampis pažymėjimas, Keisti / Išvalyti). Antrasis sluoksnis, žaliasis, yra matomas. Alfa kanalas vis dar yra baltas, kadangi šioje paveikslėlio dalyje yra nepermatomas sluoksnis.
Pav. 8.4. Alfa kanalo pavyzdys: du permatomi sluoksniai
Kairioji antrojo sluoksnio dalis buvo padaryta permatoma. Trečiasis sluoksnis, mėlynasis, yra matomas pro pirmąjį ir antrąjį sluoksnius. Alfa kanalas vis dar yra baltas, kadangi šioje paveikslėlio dalyje yra nepermatomas sluoksnis.
Pav. 8.5. Alfa kanalo pavyzdys: trys permatomi sluoksniai
The left part of the third layer has been made transparent. The Alpha channel is still white and the left part of the layer is opaque. The background layer has no Alpha channel. In this case, the Clear command works like the Eraser and uses the Background color of Toolbox.
Pav. 8.6. Alfa kanalo pavyzdys: alfa kanalas pridėtas sluoksniui
We used the → → command, on the Background layer. Now, the left part of the image is fully transparent and has the color of the page the image is lying on. The left part of the Alpha Channel thumbnail is black (transparent) in the Channel Dialog.
Sluoksnio tipą nurodo paveikslėlio tipas (žr. ankstesnę sekciją) ir alfa kanalo buvimas arba nebuvimas. Tai yra galimi sluoksnių tipai:
RGB
RGBA
Pilkas
PilkasA
Indeksuotas
IndeksuotasA
Pagrindinė priežastis, kodėl tai yra svarbu, yra tai, kad dauguma filtrų (meniu ) priima tik dalį sluoksnių tipų, o jeigu aktyvus sluoksnis nėra priimtino tipo, šiame meniu filtrai būna neaktyvūs. Dažnai tai galite pataisyti pakeisdami paveikslėlio veikseną arba, pridėdami / pašalindami alfa kanalą.
Visibility
It is possible to remove a layer from an image, without destroying it, by clicking on the symbol in the Layers dialog. This is called „toggling the visibility“ of the layer. Most operations on an image treat toggled-off layers as if they did not exist. When you work with images containing many layers, with varying opacity, you often can get a better picture of the contents of the layer you want to work on by hiding some of the other layers.
|
Patarimas |
|---|---|
|
Jeigu laikydami paspaudę klavišą Shift spustelėsite akies simbolį, visi sluoksniai išskyrus spustelėtąjį bus paslėpti. |
Usually, you activate a layer, to work on it, clicking it in the layer list. When you have a lot of layers, finding which layer an element of the image belongs to is not easy: then, press Alt and click with Mouse wheel on this element to activate its layer. The available layers will be looped through (starting from the upper one) while the Alt is held and the picked layer will be temporarily displayed in the status bar.
Linkage to other layers
Jeigu spustelėsite tarp akies piktogramos ir sluoksnio miniatiūros, gausite grandinės piktogramą, įgalinančią grupuoti sluoksnius operacijoms, atliekamoms keliuose sluoksniuose (pvz., naudojant perkėlimo arba transformavimo įrankius).
In GIMP, the boundaries of a layer do not necessarily match the boundaries of the image that contains it. When you create text, for example, each text item goes into its own separate layer, and the layer is precisely sized to contain the text and nothing more. Also, when you create a new layer using cut-and-paste, the new layer is sized just large enough to contain the pasted item. In the image window, the boundaries of the currently active layer are shown outlined with a black-and-yellow dashed line.
Pagrindinė priežastis, kodėl tai yra svarbu, yra tai, kad sluoksniui, esančiam už šių ribų nieko negalite padaryti: negalite veikti to, kas neegzistuoja. Jeigu dėl to jums kyla problemų, galite pakeisti sluoksnio matmenis naudodamiesi keliomis meniu esančiomis komandomis.
|
Pastaba |
|---|---|
|
Sluoksnio naudojamos atminties dydis priklauso nuo jo matmenų, ne nuo jo turinio. Taigi, jeigu dirbate su dideliais paveikslėliais arba paveikslėliais, kuriuose yra daug sluoksnių, gali būti naudinga apkirpti sluoksnius iki mažiausio galimo dydžio. |
Sluoksnio nepermatomumas nurodo kiek yra matomos žemiau esančių sluoksnių spalvos. Nepermatomumas gali būti nuo 0 iki 100, 0 – visiškas permatomumas, o 100 – visiškas nepermatomumas.
Sluoksnio veiksena nurodo kiek sluoksnio spalvų yra kombinuojama su žemiau esančių sluoksnių spalvomis, norint gauti matomą rezultatą. Tai yra gana sudėtinga, ir pakankamai svarbu, kad šiam principui būtų skirta atskira sekcija, žr. Skyrius 2, „Sluoksnių veiksenos“.
Be alfa kanalo yra dar ir kitas būdas valdyti sluoksnio permatomumą: pridedant sluoksnio kaukę, kuri yra papildoma pilkų atspalvių piešimo sritis, susieta su sluoksniu. Pagal numatytuosius parametrus sluoksnis neturi sluoksnio kaukės: ją reikia pridėti atskirai. Kas yra sluoksnių kaukės ir kaip jas naudoti yra aprašyta sekcijoje Sluoksnio kaukė.