2.2. Diàleg dels canals

Figura 15.10. El diàleg dels canals

El diàleg dels canals

El diàleg dels canals és la principal interfície per a editar, modificar i administrar els canals. Els canals tenen un doble ús. És per això que el diàleg es divideix en dues parts: la primera part és per als canals de color, i la segona és per les màscares de selecció.

Color channels apply to the image and not to a specific layer. Basically, three primary colors are necessary to render all the wide range of natural colors. As other digital software, GIMP uses Red, Green, and Blue as primary colors. The first and primary channels display the Red, Green, and Blue values of each pixel in your image.

Next to the channel name is a thumbnail displaying a grayscale representation of each channel, where white is 100% and black is 0% of the primary color. Alternatively, if your image is not a colored but a Grayscale image, there is only one primary channel called Gray. For an Indexed image with a fixed number of known colors there is also only one primary channel called Indexed.

Then there is an optional channel called Alpha. This channel displays transparency values of each pixel in your image (See Alpha Channel in Glossary). In front of this channel is a thumbnail displaying a grayscale representation of the transparency where white is opaque and visible, and black is transparent and invisible. If you create your image without transparency then the Alpha channel is not present, but you can add it from the Layers dialog menu. Also, if you have more than one layer in your image, GIMP automatically creates an Alpha channel.

[Nota] Nota

El GIMP no suporta els models de color CMYK i YUV.

Figura 15.11. Representació d'una imatge amb canals

Representació d'una imatge amb canals

Canal vermell

Representació d'una imatge amb canals

Canal verd

Representació d'una imatge amb canals

Canal blau

Representació d'una imatge amb canals

Canal alfa

Representació d'una imatge amb canals

Tots els canals


La imatge de la dreta està composta per tres canals de color (vermell, verd i blau) i un canal alfa per a la transparència. En la imatge de la dreta, la transparència es mostra com un escaquer. En el canal de color, el blanc és sempre blanc perquè tots els colors hi són, i el negre és negre. El barret vermell és visible al canal vermell però invisible en els altres dos canals. Passa el mateix per al verd i el blau pur, que apareixen respectivament en el canal verd i el canal blau i estan absents en els altres.

2.2.1. Activeu el diàleg

El diàleg de «Canals» és un diàleg acoblable; mireu Secció 2.3, «Diàlegs i acobladors» per a obtenir més informació.

Podeu accedir-hi:

  • des del menú de la imatge: DiàlegsDiàlegs acoblablesCanals

  • des del menú de la pestanya en qualsevol diàleg acoblable fent clic a i seleccionant Afegeix una pestanyaCanals.

En el menú Finestres, hi ha una llista de finestres separades que només existeix si almenys un diàleg roman obert. En aquest cas, podeu obrir el diàleg «Canals» des del menú de la imatge: FinestresCanals.

2.2.2. Using the Channels dialog

2.2.2.1. Visió general

The channels at the top are the color channels and the optional Alpha channel. They are always organized in the same order and they cannot be removed. In the middle are two lock buttons, that show the lock status for the currently selected channel in the bottom area. The bottom area shows a list of selection masks. Every channel appears in the list with its attributes, including a thumbnail and its name. A right-click in a channel list entry opens the channel context menu.

2.2.2.2. Channel lock attributes

Above the list of selection mask channels are two check boxes that show the lock attributes state of the currently selected mask channel.

Bloqueja els píxels

The paintbrush icon shows whether «lock pixels» is enabled (highlighted) for the current channel. When this is enabled, the channel is locked for any action that changes the pixels, meaning there will be no changes done to this channel.

Posició i mida del bloqueig

The cross-with-arrows icon shows whether «lock position and size» is enabled (highlighted) for the current channel. When this is enabled, the channel is locked for any action that changes the position or size.

2.2.2.3. Atributs del canal

Cada canal apareix a la llista amb els seus atributs, molt similars als atributs de les capes:

Visibilitat dels canals

Per defecte, cada canal i cada color són visibles. S'indica amb una icona d'un «ull obert». Fent clic sobre el símbol de l'ull (o l'espai si el canal no és visible) canviarà la visibilitat del canal.

Enllaçar els canals

The channels representing selection masks (in the lower part of the channel list) may be grouped using the button with the «chain» symbol. All channels that have the chain enabled will be affected in the same way by operations applied to any one of them.

Primary color channels (the default channels in the upper part of the channel list) may be grouped too. By default, all color channels (and the alpha channel) are selected, their list entries are highlighted. Operations will be performed on all channels. By clicking on a channel list entry you can deactivate this channel. Operations like colorizing a layer will then be applied to the selected («grouped») channels only. Clicking on the deactivated list entry will activate the channel again.

Miniatura

A small preview icon represents the effect of the channel. This preview can be enlarged by holding down the left mouse button on it.

Nom del canal

The name of the channel, which must be unique within the image. Double-clicking on the name of a selection mask channel will allow you to edit it. The names of the primary channels (Red, Green, Blue, Alpha) can not be changed. Double-clicking on the preview icon will open a dialog where you can set all channel attributes.

[Atenció] Atenció

Activated channels appear highlighted in the dialog. If you click on a channel in the list you toggle activation of the corresponding channel. Disabling a color channel red, blue, or green has severe consequences. For instance if you disable the blue channel, all pixels from now on added to the image will not have a blue component, and so a white pixel will have the yellow complementary color.

2.2.2.4. Gestió dels canals

Below the channel list is a set of buttons allowing you to perform some basic operations on channel list.

Canal nou

This creates a new channel. A dialog will open where you can set the Channel name, the Color tag, the channel attributes and lock attributes, and finally the Opacity and color used for the mask in the image window. A click on the color button displays the GIMP color selector where you can change the mask color. If you press the Shift key while clicking the New Channel button, the New Channel Dialog will not be opened. Instead the new channel will be created with the same settings as used previously. This new channel is a channel mask (a selection mask) applied over the image. See Selection Mask

Apuja el canal

Only available for selection masks: here you can move the channel up in the list. Press Shift key to move the channel to the top of the list.

Abaixa el canal

This moves the channel down in the list. Press the Shift key to move the channel to the bottom of the list.

Duplica el canal

This allows you to create a copy of the active channel. The name of the new channel is suffixed with a number.

[Suggeriment] Suggeriment

També podeu duplicar un canal de color o el canal alfa. És una forma senzilla de tenir una còpia per a utilitzar-la més endavant com la selecció d'una imatge.

Replace the Selection with this Channel

Here you can transform the channel to become a selection. By default the selection derived from a channel replaces the active selection. You can change this by using control keys.

  • Shift: the selection derived from a channel is added to the active selection. The final selection is merged from both.

  • Ctrl: the final selection is the subtraction of the selection derived from a channel from the active selection.

  • Shift+Ctrl: the final selection is the intersection of the selection derived from a channel with the active one. Only the selected parts common to both are kept.

Suprimeix el canal

Only available for selection masks: this allows you to delete the active channel.

2.2.2.5. Menú contextual dels canals

Figura 15.12. Menú contextual del canal

Menú contextual del canal

Visió general

You can get the channel context menu by right clicking on a channel. Several of the operations on channels are also available through buttons at the bottom of the channels list. Those operations are documented there.

Canal nou, Apuja el canal, Abaixa el canal, Duplica el canal, Suprimeix el canal

Consulteu la Gestió de canals.

Edit Channel Attributes...

Only available for selection masks. Here you can change the Channel name, the Color tag, the channel attributes and lock attributes, and finally the Opacity and color used for the mask in the image window. A click on the color button displays the GIMP color selector where you can change the mask color.

Color tag

Only available for selection masks. This allows you to assign a color tag to a channel. If you have a lot of channels this can make it easier to identify them by giving related channels the same color tag. To remove the color tag choose None.

Canal a la selecció

The selection derived from a channel replaces the previously active selection.

Afegeix a la selecció

The selection derived from a channel is added to the active selection. The final selection is merged from both.

Sostreu de la selecció

The final selection is the subtraction of the selection derived from a channel from the active selection.

Interseca amb la selecció

The final selection is the intersection of the selection derived from a channel with the active one. Only the selected parts common to both are kept.

2.2.3. Màscares de selecció

Figura 15.13. Una selecció composta de canals.

Una selecció composta de canals.

Els canals es poden utilitzar per a desar i restaurar les seleccions. En el diàleg de canals podeu veure una miniatura que representa la selecció. Les màscares de selecció són una manera gràfica de construir seleccions en un canal a escala de grisos on els píxels blancs se seleccionen i els píxels negres no se seleccionen. Per tant, els píxels grisos se seleccionen parcialment. Podeu considerar-los com un difuminat de la selecció, una transició suau entre seleccionat i no seleccionat. És important evitar l'efecte pixelat quan ompliu una selecció o quan s'esborra el contingut després d'aïllar un subjecte del seu fons.

Creació de màscares de selecció

Hi ha diverses maneres d'iniciar una màscara de selecció.

  • Des del menú de la finestra de la imatge SeleccionaDesa en el canal si hi ha una selecció activa.

  • In the image window the bottom-left button creates a Quick Mask; the content will be initialized with the active selection.

  • Des del diàleg de canals, quan feu clic al Nou canal o des del menú contextual. Una vegada creada la màscara de selecció apareix en el diàleg de canals amb el nom «Còpia de màscara de selecció», seguit d'un número. Podeu canviar aquest nom des del menú contextual que s'obté fent clic dret sobre el canal.

2.2.3.1. Ús de les màscares de selecció

Once the channel is initialized, selected (highlighted in blue), visible (eye-icon in the dialog), and displayed as you want (color and opacity attributes), you can start to work with all the paint tools. The colors used are important. If you paint with some color other than white, gray, or black, the color Value (luminosity) will be used to define a gray (medium, light, or dark). When your mask is painted, you can transform it to a selection by clicking on the button (Channel to Selection) or from the context menu.

També podeu treballar les màscares de selecció amb altres eines, no només amb les eines de pintar. Per exemple, podeu utilitzar les eines de selecció per a omplir zones amb degradats o amb patrons. Afegint diverses màscares de selecció a la llista podeu compondre fàcilment seleccions molt complexes. Es pot dir que una màscara de selecció és a una selecció el que una capa és a una imatge.

[Atenció] Atenció

Una vegada que la màscara de selecció està activada, es treballa sobre la màscara i no sobre la imatge. Per a tornar a treballar en la imatge, heu de desactivar totes les màscares de selecció. Tampoc no oblideu ocultar les màscares desactivant la icona ull. Comproveu que tots els canals RGB i alfa estiguin activats i visibles en la imatge.

2.2.4. Màscara ràpida

Figura 15.14. El diàleg de la «Màscara ràpida»

El diàleg de la «Màscara ràpida»

Una Màscara ràpida és una Màscara de selecció pensada per a ser utilitzada temporalment per a pintar una selecció. Temporalment significa que s'eliminarà de la llista del canal després d'haver estat convertida en selecció, a diferència de la màscara de selecció normal. Les eines de selecció de vegades mostren els seus límits quan s'han d'utilitzar per a fer seleccions complicades, de manera progressiva. En aquest cas, la màscara ràpida pot donar molt bons resultats.

2.2.4.1. Activa el diàleg

La Màscara ràpida es pot activar de diverses maneres:

  • Des del menú de la imatge: Selecciona(Des)activa la Màscara ràpida.

  • Fent clic al botó de la part inferior esquerra, es veu en vermell en la captura de pantalla.

  • Utilitzant la drecera Maj+Q.

2.2.4.2. Creació d'una màscara ràpida

Per a iniciar una Màscara ràpida, feu clic al botó de la part inferior esquerra en la finestra de la imatge. Si s'activa una selecció en la vostra imatge, el seu contingut apareixerà sense canvis mentre que la vora es cobrirà amb un color vermell translúcid. Un altre clic al botó de la part inferior esquerra desactivarà la màscara ràpida.

Des del diàleg dels canals podeu fer doble clic en el nom o la miniatura per a editar els atributs de la Màscara ràpida. Llavors podeu canviar l'Opacitat i el seu color d'emplenat. En qualsevol moment podeu amagar la màscara fent clic a la icona ull davant de la Màscara ràpida.

La màscara es codifica en escala de grisos, així heu d'utilitzar el blanc o el gris per a reduir l'àrea limitada per la màscara i el negre per a incrementar-la. Les zones pintades de gris seran de transició per a la selecció, zones difuses. Quan la màscara estigui a punt, feu clic de nou al botó de la part inferior esquerra en la finestra de la imatge, i la màscara ràpida serà retirada de la llista del canal i es convertirà en una selecció.

El propòsit de la màscara ràpida és pintar una selecció i les seves transicions amb una eina de pintura sense la preocupació per a la gestió de les mascares de selecció. És una bona manera d'aïllar un objecte en una imatge perquè un cop feta la selecció només caldrà treure el contingut (o revertir-ho si l'objecte està en la selecció).

2.2.4.3. Ús de la Màscara ràpida amb un degradat

Descripció

  1. Captura de pantalla amb la màscara ràpida activada. Tan aviat com s'activa la Màscara ràpida, s'hi realitzen totes les operacions. S'aplica a la màscara un degradat de negre (esquerra) a blanc (dreta).

  2. La màscara ràpida està desactivada. La selecció ocupa la meitat dreta de la imatge (caminet de formiguetes) a causa que el límit de la selecció està al mig del degradat.

  3. S'afegeix un traç a la selecció habilitada. Que estrany! El degradat encara que no sigui visible, roman actiu en tota la imatge, a les àrees seleccionades i en les no seleccionades.

Després de fer clic al botó de la Màscara ràpida, l'ordre genera un canal temporal de 8 bits (0-255), en el qual s'hi desa progressivament el treball de la selecció. Si ja hi ha una selecció present, la màscara s'inicialitza amb el contingut de la selecció. Un cop activada la màscara ràpida, la imatge queda coberta amb un vel vermell semitransparent. Això representa els píxels no seleccionats. Podeu utilitzar qualsevol eina de pintura per a modificar aquesta màscara i crear la selecció resultant. S'utilitzaran només colors de l'escala de grisos, d'acord amb les propietats del canal, el blanc permet definir els futurs llocs seleccionats. La selecció es mostrarà tan aviat com la màscara ràpida es desactivi però el canal temporal ja no estarà disponible.

[Suggeriment] Suggeriment

Per a desar en un canal la selecció feta amb la màscara ràpida, seleccioneu el menú Selecciona/Desa en el canal

2.2.4.4. Ús
  1. Obre una imatge o comença un document nou.

  2. Activeu la Màscara ràpida fent clic en el botó de la cantonada inferior esquerra de la finestra de la imatge. Si una selecció hi és present, la màscara s'inicialitzarà amb el contingut de la selecció.

  3. Trieu una eina de dibuix i utilitzeu-la amb colors de l'escala de grisos sobre la màscara ràpida.

  4. Desactiveu la Màscara ràpida emprant el botó de la part inferior esquerra de la finestra de la imatge.