Documented the pat version 1 file format while I was at it.

2003-07-09  Dave Neary  <bolsh@gimp.org>

        * devel-docs/pat.txt: Documented the pat version 1 file
        format while I was at it.
This commit is contained in:
Dave Neary 2003-07-09 19:28:22 +00:00 committed by David Neary
parent eb587f9df6
commit 6d0ba8fa2e
2 changed files with 49 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2003-07-09 Dave Neary <bolsh@gimp.org>
* devel-docs/pat.txt: Documented the pat version 1 file
format while I was at it.
2003-07-09 Dave Neary <bolsh@gimp.org>
* devel-docs/gbr.txt: Documented the gbr version 2 file

44
devel-docs/pat.txt Normal file
View File

@ -0,0 +1,44 @@
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 brush.
1 = greyscale, 2 = greyscale + A, 3 = RGB, 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 - (header_size - 24):
Type: char *
Value: UTF-8 string - name of brush
BODY
----
Size: width * height * bytes
Type: uchar *
Value: Pixel values (row-first) for pattern