devel-docs: GIMP format specs files moved to gimp-web-devel repository.

This commit is contained in:
Jehan 2022-11-14 23:06:37 +01:00
parent fde0315cb3
commit f7f92b61e1
8 changed files with 0 additions and 2097 deletions

View File

@ -1,8 +0,0 @@
EXTRA_DIST = \
gbr.txt \
ggr.txt \
gih.txt \
gpb.txt \
pat.txt \
vbr.txt \
xcf.txt

View File

@ -1,75 +0,0 @@
The GIMP Paintbrush File Format Version 1 (.gbr)
------------------------------------------------
Based on examples and code, it seems that v1 is like v2, but it is
lacking bytes 20 - 27 (no magic or spacing info), and thus having
as last header field:
Bytes 20 - (header_size - 1):
Type: char *
Value: undefined encoding string - name of brush
GBR v1 is deprecated and should never be used to save new brushes.
The GIMP Paintbrush File Format Version 2 (.gbr)
------------------------------------------------
HEADER
------
Bytes 0 - 3: header_size:
Type: 32 bit unsigned int
Value: size of brush header (28) + length of brush name
Bytes 4 - 7: version
Type: 32 bit unsigned int
Value: The file format version.
Bytes 8 - 11: width
Type: 32 bit unsigned int
Value: Brush width
Bytes 12 - 15: height
Type: 32 bit unsigned int
Value: Brush height
Bytes 16 - 19: bytes
Type: 32 bit unsigned int
Value: Colour depth of brush.
1 = greyscale, 4 = RGBA
Bytes 20 - 23: magic_number
Type: 32 bit unsigned int
Value: GIMP brush magic number.
('G' << 24) + ('I' << 16) + ('M' << 8) + 'P'
Bytes 24 - 27: spacing
Type: 32 bit unsigned int
Value: Default spacing to be used for brush. Percentage
of brush width.
Bytes 28 - (header_size - 1):
Type: char *
Value: UTF-8 string - name of brush
BODY
----
Size: width * height * bytes
Type: uchar *
Value: Pixel values (row-first) for brush
The GIMP Paintbrush File Format Version 3 (.gbr)
------------------------------------------------
This changed GIMP brush format was introduced by the FilmGimp or
CinePaint developers without notifying the GIMP developers. We've
added support for reading these brushes. The format is very similar
to version 2 but uses the bytes field as a data format identifier.
It seems the only format identifier in use is 18 which corresponds
to 16bit floats. If you encounter brushes with a different data
format, please let the GIMP developers know.

View File

@ -1,73 +0,0 @@
The .ggr file format.
GGR files are used to store GIMP gradients. A gradient consists of a
series of consecutive *segments* spanning the range from 0.0 to 1.0. Each
segment has the following attributes:
Left Endpoint coordinate: (double)
Left Endpoint color (RGBA color)
Right Endpoint coordinate (double)
Right Endpoint color (RGBA color)
Midpoint coordinate (double)
Blending function (enum; values are:
0 = "linear"
1 = "curved"
2 = "sinusoidal"
3 = "spherical (increasing)"
4 = "spherical (decreasing)"
5 = "step")
Coloring type (enum; values are:
0 = "RGB"
1 = "HSV CCW"
2 = "HSV CW")
Left and right Endpoint Color type (enum; values are:
0 = "fixed"
1 = "foreground",
2 = "foreground transparent"
3 = "background",
4 = "background transparent")
A GGR file is an ASCII file structured as follows:
Line 1: "GIMP Gradient"
Line 2: "Name: " followed by the name of the gradient
Line 3: the number of segments
The remaining lines consist of segment specifications. There must be
one line for each segment. Each line contains 15 numbers -- the first
11 are floats, the remaining 4 are ints. Here is what each field
encodes:
Field Meaning
0 Left endpoint coordinate
1 Midpoint coordinate
2 Right endpoint coordinate
3 Left endpoint R
4 Left endpoint G
5 Left endpoint B
6 Left endpoint A
7 Right endpoint R
8 Right endpoint G
9 Right endpoint B
10 Right endpoint A
11 Blending function type
12 Coloring type
13 Left endpoint color type
14 Right endpoint color type
The left endpoint coordinate of each segment must equal the right
endpoint coordinate of the preceding segment.
Note 1: This is a description of the *new* gradient file format. In
earlier versions of GIMP a different format was used.
Note 2: In GIMP versions prior to 2.3.11 the file format didn't contain
the color types of the endpoints, thus it was impossible to get the
behavior of the special "FG to BG" etc. gradients in custom gradients.
Note 3: Starting with version 2.1, GIMP now has the ability to load
gradients in SVG gradient format, if the file is placed in the user's
personal "gradients" directory, or some other location in the
gradients search path.

View File

@ -1,51 +0,0 @@
Gimp Image Pipe Format
The gih format is use to store a series of brushes, and some extra info
for how to use them.
Basically, the format is real simple. It is a text header, followed
by a series of gbr files, all concatenated together.
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.
An idea for how to implement editing of image pipes (with 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.)
The header format
================
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)
ie
===========================
Fire
6 ncells:6 step:20 dim:1 cols:3 rows:2 rank0:6 selection:incremental
===========================
The rest is just gbr files catted in.
Making a gih file:
1. Create a series of gbr files. Note these do not
need to be the same size.
2. Create a text header like above.
3. Combine them all together:
cat header brush1.gbr brush2.gbr brush3.gbr > foo.gih
Or use the GIH plug-in to save a brush pipe from an image.
That's about it for now.

View File

@ -1,10 +0,0 @@
Gimp Pixmap Brush File Format
**********************************************
* THIS FORMAT IS OBSOLETE AND SHOULD GO AWAY *
**********************************************
The current format for gpb files, the pixmap
brush format is very simple. What it essentially
boils down to is a greyscale gbr (gimp brush) and
a rgb pat (gimp pattern) concatenated into the same file.

View File

@ -1,44 +0,0 @@
The GIMP Pattern File Format Version 1 (.pat)
------------------------------------------------
HEADER
------
Bytes 0 - 3: header_size:
Type: 32 bit unsigned int
Value: size of pattern header (24) + length of pattern name
Bytes 4 - 7: version
Type: 32 bit unsigned int
Value: The file format version.
Bytes 8 - 11: width
Type: 32 bit unsigned int
Value: Pattern width
Bytes 12 - 15: height
Type: 32 bit unsigned int
Value: Pattern height
Bytes 16 - 19: bytes
Type: 32 bit unsigned int
Value: Colour depth of pattern
1 = greyscale, 2 = greyscale + A, 3 = RGB, 4 = RGBA
Bytes 20 - 23: magic_number
Type: 32 bit unsigned int
Value: GIMP pattern magic number.
('G' << 24) + ('P' << 16) + ('A' << 8) + 'T'
Bytes 24 - (header_size - 1):
Type: char *
Value: UTF-8 string - name of pattern
BODY
----
Size: width * height * bytes
Type: uchar *
Value: Pixel values (row-first) for pattern

View File

@ -1,64 +0,0 @@
The GIMP Generated Brush File Format Version 1 (.vbr)
-----------------------------------------------------
Updated August 24, 2006.
The VBR format is used for "generated" brushes, that is, brushes
specified by a set of numerical parameters rather than a bitmap or
pixmap. This format dates back to at least 1998, although it
has been tweaked several times. The most recent tweak, in August
2004, added support for variable shapes. Prior to this, the
version number used was always 1.0. The version number used for
shaped brushes is 1.5.
VBR files are plain text tiles, consisting of a set of fields
separated by line breaks. The number of lines is variable, 10 if the
brush is "shaped", 8 otherwise. All numerical fields are in float
format, with a dot as decimal separator, except the number of spikes
(for shaped brushes), which is an integer.
Non-shaped brushes:
Line 1: Must always contain the magic string "GIMP-VBR".
Line 2: Version number, always "1.0".
Line 3: The name of the brush. This is a UTF-8 string, with a maximum
length of 255 bytes.
Line 4: The brush spacing.
Line 5: The brush radius, in pixels.
Line 6: The brush hardness.
Line 7: The brush aspect ratio.
Line 8: The brush angle.
Shaped brushes:
Line 1: Must always contain the magic string "GIMP-VBR".
Line 2: Version number, always "1.5".
Line 3: The name of the brush. This is a UTF-8 string, with a maximum
length of 255 bytes.
Line 4: A string giving the shape of the brush. Currently "circle",
"square", and "diamond" are supported. The possible shapes
are defined by the GimpBrushGeneratedShape enum in
core-enums.h.
Line 5: The brush spacing.
Line 6: The brush radius, in pixels.
Line 7: The number of spikes for the shape.
Line 8: The brush hardness.
Line 9: The brush aspect ratio.
Line 10: The brush angle.

File diff suppressed because it is too large Load Diff