gih.txt 1.56 KB
Newer Older
Tor Lillqvist's avatar
Tor Lillqvist committed
1
Gimp Image Pipe Format
2

3 4
The gih format is use to store a series of brushes, and some extra info 
for how to use them. 
5 6

Basically, the format is real simple. It is a text header, followed
7
by a series of gbr files, all concatenated together.
8

9 10 11 12
An image pipe can be thought of as an n-dimensional array of brushes.  
Each dimension is indexed when the pipe is used in painting by some 
parameter, eg an incremental counter, a random value, pointing device 
pen pressure,tilt or velocity , etc.
Tor Lillqvist's avatar
Tor Lillqvist committed
13 14 15 16 17 18 19 20

An idea for how to implement editing of image pipes (with the GIMP) is
that each layer of the edited image representing the pipe is divided
conceptually (and visualized by guides) into equal-sized elements,
each element containing one pixmap brush. The typical cases are only
one layer, with an array of brushes, or many layers, with just one
brush per layer. (For instance something produced by some animator.)

21 22 23
The header format
================

Tor Lillqvist's avatar
Tor Lillqvist committed
24 25 26
First line is the name of the pipe.
Second line is the number of brushes in file, followed by the contents of
the gimp-image-pipe-parameters parasite (a text string)
27 28 29 30

ie
===========================
Fire
Tor Lillqvist's avatar
Tor Lillqvist committed
31
6 ncells:6 step:20 dim:1 cols:3 rows:2 rank0:6 selection:incremental
32 33
===========================

34
The rest is just gbr files catted in.
35 36 37

Making a gih file:

38
	1. Create a series of gbr files. Note these do not
39 40 41 42 43 44
	need to be the same size.

	2. Create a text header like above.

	3. Combine them all together:

45
		cat header brush1.gbr brush2.gbr brush3.gbr > foo.gih
46 47


48
Or use the GIH plug-in to save a brush pipe from an image.
49 50


51
Thats about it for now.