Indice
Spesso quando si opera su di un'immagine si desidera lavorare solo su parte di essa. In GIMP basta selezionare questa parte. Ogni immagine ha una selezione associata ad essa. Molte, ma non tutte, le operazioni di GIMP lavorano solo sulla porzione selezionata dell'immagine.
Ci sono molte situazioni nelle quali la creazione della giusta selezione è la chiave per ottenere il risultato voluto e spesso non è un'impresa facile. Per esempio, nell'immagine sopra riportata, supponiamo si voglia togliere l'albero dallo sfondo e incollarlo su di un'altra immagine. Per fare ciò è necessario creare una selezione che contenga l'albero e nient'altro. Ciò è molto difficile, dato che l'albero ha una forma così complessa e in molti punti è arduo distinguerlo dallo sfondo.
Ecco un punto molto importante da comprendere: normalmente, quando si crea una selezione, viene mostrata una linea tratteggiata che racchiude una porzione dell'immagine. L'idea è che la selezione è una specie di contenitore con la parte selezionata all'interno e il resto all'esterno. Questo concetto di selezione è ottimo per molti scopi ma non è propriamente corretto.
In effetti la selezione è implementata come un canale. In termini della sua struttura interna è uguale a ciò che avviene per i canali rosso, verde, blu e alfa di un'immagine. Perciò la selezione ha un valore definito per ogni pixel dell'immagine che varia da 0 (non selezionato) a 255 (completamente selezionato). Il vantaggio di quest'approccio è che permette ad alcuni punti di essere parzialmente selezionati, dando un valore intermedio tra 0 e 255. Come si vedrà, ci sono molte situazioni nelle quali è molto utile avere transizioni morbide tra le regioni selezionate e quelle che non lo sono.
Allora, cos'è quella linea tratteggiata che appare quando si crea la selezione?
È una linea di contorno, che divide le aree che sono selezionate per più della metà da quelle che lo sono per meno della metà del valore del canale di selezione.
While looking at the dashed line that represents the selection, always remember that the line only tells part of the story. If you want to see the selection in full detail, the easiest way is to click the Quick Mask button in the lower left corner of the image window. This causes the selection to be shown as a translucent overlay atop the image. Selected areas are unaffected; unselected areas are reddened. The more completely selected an area is, the less red it appears.
Many operations work differently in Quick Mask mode, as mentioned in the Quick Mask overview. Use the Quick Mask button in the lower left corner of the image window to toggle Quick Mask mode on and off.
With the default settings, the basic selection tools, such as the Rectangle Select tool, create sharp selections. Pixels inside the dashed line are fully selected, and pixels outside completely unselected. You can verify this by toggling Quick Mask: you see a clear rectangle with sharp edges, surrounded by uniform red. Use the «Feather edges» checkbox in the Tool Options to toggle between graduated selections and sharp selections. The feather radius, which you can adjust, determines the distance over which the transition occurs.
If you are following along, try this with the Rectangle Select tool, and then toggle Quick Mask. You will see that the clear rectangle has a fuzzy edge.
La sfumatura è particolarmente utile quando si deve tagliare e incollare perché aiuta la parte incollata a mescolarsi dolcemente senza stacchi netti sullo sfondo circostante.
It is possible to feather a selection at any time, even if it was originally created as a sharp selection. Use
→ from the main menu to open the Feather Selection dialog. Set the feather radius and click . Use → to do the opposite—sharpen a graduated selection into an all-or-nothing selection.Nota | |
---|---|
Per i lettori amanti della tecnica: la sfumatura funziona applicando una sfumatura gaussiana al canale di selezione col il raggio di sfumatura specificato. |
È possibile impostare l'opacità di un livello ma non è possibile farlo direttamente con una selezione. È molto utile per rendere un'immagine trasparente come il vetro. Ecco quindi alcuni metodi per ottenere questo effetto:
Con le selezioni semplici: basta usare lo strumento Gomma con l'opacità desiderata.
For complex selections: use «Floating Selection» (Sezione 4.5, «Fluttuante»). Set the opacity slider in the Layer Dialog to the desired opacity. Then anchor the selection: outside the selection, the mouse pointer includes an anchor. When you click while the mouse pointer includes the anchor, the floating selection disappears from the Layer Dialog and the selection is at the right place and partially transparent (anchoring works this way only if a selection tool is activated: you can also use the Anchor Layer command in the context menu by right clicking on the selected layer in the layer dialog).
→ to create a floating selection. This creates a new layer with the selection calledAnd, if you use this function frequently: Ctrl-C to copy the selection, Ctrl-V to paste the clipboard as a floating selection, and → to turn the selection into a new layer. You can adjust the opacity before, or after creating the new layer.
Another way: use Sezione 2.1.4, «Maschere di livello».
→ → to add a layer mask to the layer with the selection, initializing it with the selection. Then use a brush with the desired opacity to paint the selection with black, i.e. paint it with transparency. Then → → . SeeSe si desidera rendere trasparente lo sfondo pieno di un'immagine agire come segue: aggiungere un canale alfa e selezionare lo sfondo usando lo strumento Bacchetta Magica. Poi, con lo strumento di prelievo colore, selezionare il colore di sfondo che diventa il colore di sfondo nel pannello degli strumenti. Infine usare sulla selezione lo strumento di riempimento nella modalità «cancellazione colore». Con questo metodo si cancellano i pixel del colore prelevato; gli altri pixel vengono parzialmente cancellati nella componente del colore corrispondente, modificandone in tal modo il colore.
Il metodo più semplice è il comando
→ , che dona completa trasparenza ad una selezione.