Toy
| Blur |

### 1.0. Toy

Revision history
Revision $Revision: 1.0.3 $ | 2011-11-20 | r.s

The „Toy“ tool creates the so called toy effect or tilt-shift miniature faking. The tool allows you to change contrast and saturation of the active layer. Then a copy of this layer is created and the user defined blurring of this layer is performed. A layer mask defines direction and dimension of focus and blurring, which can either defined by slider or visually in the preview picture of the plug-in.

#### 1.0.1. Activate the Tool

You can get to this tool :

- In the image menu through Filters → Blur → Toy.

- In Script-Fu with the command
  (plug-in-toy RUNMODE IMAGE DRAWABLE CONTRAST SATURATION RADIUS STARTX STARTY ENDX ENDY).

#### 1.0.2. "Toy" Options

Figure 1.0. The "Toy" dialog

Demo picture: "Marina Duisburg am Innenhafen" - G. Sawatzky - Wikipedia.de

Picture parameters

  You can define the look of the toy effect with these sliders:

  Blur

    This slider represents the amount of blurring in your picture. You can enter values between 5.0 and 100.0 pixel.

  Contrast

    This slider represents the increase of contrast in your picture. 0 means no change of contrast, 127 means maximum increase of contrast in your picture.

  Saturation

    This slider represents the increase of saturation in your picture. 0 means no change of saturation, 100 means maximum increase of saturation in your picture. Your image must be of type RGB or RGBA for this option to be visible.

  Start X, Start Y, End X and End Y

    These sliders represent the starting and ending points of the gradient in the layer mask, which defines the "depth of field" of the effect. The starting point stands for full transparency of the upper layer (which means no blurring), the ending point stands for full opacity of the upper layer (which means maximum blurring). You can also define the gradient by clicking and dragging the green and red handles in the preview with your mouse.

#### 1.0.3. Script-Fu

Examples

  Changes contrast of the active layer by 10, saturation of the active layer by 30, creates a copy of the layer, applies blurring by 17.2 pixel and creates a layer mask containing a bilinear gradient with starting point (0.5,0.0) and ending point (0.5,0.9).

  ; contrast +10, saturation +30, blurring 17.2px
  (plug-in-toy 1 img drawable 10 30 17.2 0.5 0.0 0.5 0.9)

  Changes contrast of the active layer by 30, saturation of the active layer by 70, creates a copy of the layer, applies blurring by 7.3 pixel and creates a layer mask containing a bilinear gradient with starting point (0.0,0.0) and ending point (1.0,1.0).

  ; contrast +30, saturation +70, blurring 7.3px
  (plug-in-toy 1 img drawable 30 70 7.3 0.0 0.0 1.0 1.0)

  Download theexample scheme file and copy it to your scripts folder.

#### 1.0.4. Settings

Define size of preview picture, size and style of handles

  You can define the size of the preview picture and the size/style of the handles in your gimprc file.

  ; handles 17 px size, standard 13 px
  (plug-in-toy_handlesize "17")
  ; handles 17 px size, old syntax still works
  (plug-in-toy_knotsize "17")
  ; preview 520 px size, standard 400 px
  (plug-in-toy_previewsize "520")
  ; use alternate view of handles
  (plug-in-toy_showline "1")