5.8. Krzywe
| 5. Narzędzia kolorów |

### 5.8. Krzywe

The Curves tool is the most sophisticated tool for changing the color, brightness, contrast or transparency of the active layer or a selection. While the Levels tool allows you to work on Shadows and Highlights, the Curves tool allows you to work on any tonal range. It works on RGB images.

#### 5.8.1. Activating the Tool

You can get to this tool in several ways:

- poprzez menu obrazu: Narzędzia → Narzędzia kolorów → Кrzywe

- By clicking on the tool icon in Toolbox, if this tool has been installed there. For this, please refer to Sekcja 1.7, „Toolbox”.

#### 5.8.2. Modyfikacja krzywych kolorów

Rysunek 14.168. Оkno informacyjne narzędzia „Krzywe”

Presets

  You can save the color settings of your image by clicking the Add settings to favourites button

  The button opens a menu:

  Rysunek 14.169. Preset Menu

  which lets you Import Settings from File or Export Settings to File, and gives you access to the Manage Save Settings dialog:

  Rysunek 14.170. Manage saved Settings Dialog

Channel

  Można wybrać jeden z pięciu dostępnych kanałów: wartość, czerwony, zielony, niebieski dla nasycenia i alfa (jeśli dla obrazu aktywny jest kanał alfa).

  Value

    The curve represents the Value, i.e. the brightness of pixels as you can see them in the composite image.

  Red; Green; Blue

    The curve represents the quantity of color in each of the three RGB channels. Here, dark means little of the color. Light means a lot of the color.

  Alpha

    The curve represents the opacity of the pixels. Dark means very transparent. Light means very opaque. Your image or active layer must have an Alpha channel for this option to be enabled.

Resetuj kanał

  Przycisk ten usuwa wszystkie ustawienia dla wybranego kanału, przywracając domyślne ustawienia.

Przyciski "Liniowa" i "Logarytmiczna"

  These buttons allow to choose the Linear or Logarithmic type of the histogram. You can also use the same options in Tool Options dialog. This grayed out histogram is not displayed by default.

Strefa wyboru

  - The horizontal gradient: it represents the input tonal scale. It, too, ranges from 0 (black) to 255 (white), from Shadows to Highlights. When you adjust the curve, it splits up into two parts; the upper part then represents the tonal balance of the layer or selection.

  - The vertical gradient: it represents the destination, the output tonal scale. It ranges from 0 (black) to 255 (white), from Shadows to Highlights.

  - The chart: the curve is drawn on a grid and goes from the bottom left corner to the top right corner. The pointer x/y position is permanently displayed in the top left part of the grid. By default, this curve is straight, because every input level corresponds to the same ouput tone. GIMP automatically places an anchor at both ends of the curve, for black (0) and white (255).

    If you click on the curve, a new anchor is created. When the mouse pointer goes over an anchor, it takes the form of a small hand. You can click-and-drag the anchor to bend the curve. If you click outside of the curve, an anchor is also created, and the curve includes it automatically.

    Unactive anchors are black. The active anchor is white. You can activate an anchor by clicking on it. You can also swap the anchor activation by using the Left and Right arrow keys of your keyboard. You can move the anchor vertically with the Up and Down arrow keys. This allows you to fine tune the anchor position. Holding the Shift down lets you move it by increments of 15 pixels.

    Two anchors define a curve segment which represents a tonal range in the layer. You can click-and-drag this segment (this creates a new anchor). Of course, you can't drag it beyond the end anchors.

    To delete all anchors (apart from both ends), click on the Reset Channel button. To delete only one anchor, move beyond any adjacent anchor on horizontal axis.

    Meanwhile, on the canvas, the mouse pointer has the form of an eye-dropper. If you click on a pixel, a vertical line appears on the chart, positioned to the source value of this pixel in the selected channel. If you Shift-click, you create an anchor in the selected channel. If you Ctrl-click, you create an anchor in all channels, possibly including the Alpha channel. You can also Shift-drag and Ctrl-drag: this will move the vertical line and the anchor will show up when releasing the mouse left button.

    The histogram of the active layer or selection for the selected channel is represented grayed out in the chart. It's only a reference.

Typ krzywej
  Smooth

    This the default mode. It constrains the curve type to a smooth line with tension. It provides a more realistic render than the following.

  Free Hand

    With this mode, you can draw a broken line that you can smooth by clicking the Curve Type button again.

Preview

  Zaznaczenie pola pozwala na bieżąco śledzić efekt zmiany poziomu.

Tool Options dialog

Although this tool is not present in the Toolbox by default (For this, please refer to Sekcja 1.7, „Toolbox” if you want to add it), nevertheless it has a Tool Option Dialog under the Toolbox. These options are described here:

Skala histogramu

  These two options have the same action as the Logarithmic and Linear buttons in the Curves dialog.

Próbkuj średnią kolorów

  Suwak określa promień obszaru wyboru koloru. Obszar ten jest pokazany jako powiększony kwadrat po kliknięciu na piksel.

#### 5.8.3. Using the „Curves” tool

##### 5.8.3.1. Summary and basic shapes

We create anchors and segments on the curve and we move them to shape the curve. This curve maps „input” tones of the active layer or selection to „output” tones.

###### 5.8.3.1.1. How the Curves tool works

Moving the anchor of a pixel upwards makes this pixel brighter.

Moving the anchor upwards

###### 5.8.3.1.2. Making the curve more horizontal

Making the curve more horizontal forces all the input tonal range to occupy a shrunk output tonal range.

The histogram shows the compression of pixels into the output range. Darkest and brightest pixels disappeared: contrast decreases.

Rysunek 14.171. Making the curve more horizontal

Make the curve more horizontal

The resulting histogram

###### 5.8.3.1.3. Making the curve more vertical

Moving the upper end point to the left and the lower end point to the right is the same as moving the white slider to the left and the black slider to the right in the Levels tool: all pixels whose value is more than the white point (the flat part of the curve) are made white (more colored / more opaque according to the selected channel). All pixels whose value is less than the black point (the lower flattened curve) are made black (black / completely transparent). Pixels corresponding to points of the curve that have moved up are made lighter. Pixels corresponding to points of the curve that have moved down are made darker (green arrows). All these pixels will be extended to the whole output tonal range.

The histogram shows the extension of values, from black (0) to White (255): contrast is increased. Since the Value channel is selected, changes affect all color channels and colors increase.

Rysunek 14.172. Making the curve more vertical

Make the curve more vertical

Result and its histogram

##### 5.8.3.2. Practical cases

###### 5.8.3.2.1. Invert colors

Inverted curve

Black is made White (fully colored / fully opaque). White is made black (black, fully transparent). All pixels adopt the complementary color. Why that? Because subtracting the channel values from 255 gives the complementary color. For example: 19;197;248 a sky blue gives 255-19; 255-197; 255-248 = 236;58;7, a bright red.

###### 5.8.3.2.2. Enhance contrast

Contrast enhanced

Contrast is increased in mid tones because the curve is steeper there. Highlights and Shadows are increased but contrast is slightly less in these areas because the curve is flatter.

###### 5.8.3.2.3. Working on color channels

For every channel, we moved the white point horizontally to the left, to the first Highlights. This lightens Highlights up. Then we shaped the curve to lighten Mid tons and Shadows while keeping black.

The original image and the result

5.7. Poziomy |  | 5.9. Redukcja kolorów

Report an error in Bugzilla