Commit 690ac8d1 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

Jens Lautenbacher <jtl@gimp.org>

2000-12-18  Sven Neumann  <sven@gimp.org>
	    Jens Lautenbacher <jtl@gimp.org>

	* data/brushes/Makefile.am: remove old pepper.gpb when installing new
	brushes.

	* data/brushes/SketchBrush-16.gih
	* data/brushes/SketchBrush-32.gih
	* data/brushes/SketchBrush-64.gih: converted to grayscale brush pipes.

	* plug-ins/common/gih.c: commented out code that sets loaded pipe
	parameters as parasite until we figure out how to do it right.

	* devel-docs/gpb.txt: mention that the .gpb format is obsolete.
	* devel-docs/gih.txt: updated.
parent f44f7fc6
2000-12-18 Sven Neumann <sven@gimp.org>
Jens Lautenbacher <jtl@gimp.org>
* data/brushes/Makefile.am: remove old pepper.gpb when installing new
brushes.
* data/brushes/SketchBrush-16.gih
* data/brushes/SketchBrush-32.gih
* data/brushes/SketchBrush-64.gih: converted to grayscale brush pipes.
* plug-ins/common/gih.c: commented out code that sets loaded pipe
parameters as parasite until we figure out how to do it right.
* devel-docs/gpb.txt: mention that the .gpb format is obsolete.
* devel-docs/gih.txt: updated.
2000-12-18 Sven Neumann <sven@gimp.org>
Jens Lautenbacher <jtl@gimp.org>
......
......@@ -58,5 +58,5 @@ FILES = \
xcf.gbr
install-data-local:
rm -f $(brushdatadir)/round1.vbr
rm -f $(brushdatadir)/round1.vbr $(brushdatadir)/pepper.gpb
Gimp Image Pipe Format
The gih format is use to store a series of pixmap brushes,
and some extra info for how to use them.
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 gpb files, all concatenated together.
by a series of gbr files, all concatenated together.
An image pipe can be thought of as an n-dimensional array of pixmap
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 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 the GIMP) is
that each layer of the edited image representing the pipe is divided
......@@ -31,36 +31,21 @@ Fire
6 ncells:6 step:20 dim:1 cols:3 rows:2 rank0:6 selection:incremental
===========================
The rest is just gpb files catted in.
The rest is just gbr files catted in.
Making a gih file:
1. Create a series of gpb files. Note these do not
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.gpb brush2.gpb brush3.gpb > foo.gih
cat header brush1.gbr brush2.gbr brush3.gbr > foo.gih
Thats about it for now.
Other bits:
==========
The spacing for the pipe is currently based on the spacing
for the last brush in the pipe.
Or use the GIH plug-in to save a brush pipe from an image.
WARNING:
=======
The header file format, and possible the entire file format
is likely to change.
Adrian Likins
aug 18, 1999
Thats about it for now.
Gimp Pixmap Brush File Format
**********************************************
* THIS FORMAT IS OBSOLETE AND SHOULD GO AWAY *
**********************************************
The current format for gpb files, the pixmap
bnrush format is very simple. What it essentially
brush format is very simple. What it essentially
boils down to is a greyscale gbr (gimp brush) and
a rgb pat (gimp pattern) concatented into the same file.
The gbr is first, and is used for the greyscale mask for
the brush. The pat is second and is used for the rgb info in
the file.
The name and spacing info for the greyscale portion
is used for the name and spacing of the pixmap
brush.
The greyscale mask and the rgb data need to be of
the same height and width.
The easiest way to create a gpb file is to use the gpb plug-in.
Create an RGBA image, and save as a .gpb file.
(Before that plug-in was written, the easiest way to
create gpbs was:
1. Create a rgb image of some sort. The best
images seem to be something on a black background,
but thats not required.
2. Generate a mask for all the parts of the image
that should be transparent in the final product. There
are several ways to do this but quickmask, or select
by color, selection to channel seem to be a good way to
do it. This mask needs to be greyscale. So I usually
make it a selection, and then use "save selection
as channel"
3. Take that mask, select all, and cut it. Then
open a new greyscale image, and paste it into the
image. This is the easiest way to insure the images
are the same size and are aligned. The white portions
of this image will be what is opaque in the pixmap
brush.
Take the above mask, and save it as a .gbr file.
It doesnt need to be in the brushes dir.
5. Take the original rgb image, remove any mask layers,
and flatten the image. Setting background color to black
and flattening to a black background seems to work
a little better.
Take this image, and save it as a .pat file. This does
not need to be in the patterns directory.
6. Go to a shell, and concatenate the files together
into a .gpb. Ie, for a mask named foo.gbr, and a
rgb pat name foo.pat:
cat foo.gbr foo.pat > foo.gpb
7. Copy that foo.gpb to your brushes dir
)
Adrian Likins
aug 18, 1999
......@@ -628,7 +628,7 @@ gih_load_image (gchar *filename)
gchar *name = NULL;
gint num_of_brushes = 0;
gchar *paramstring;
GimpParasite *pipe_parasite;
/* GimpParasite *pipe_parasite; */
temp = g_strdup_printf (_("Loading %s:"), filename);
gimp_progress_init (temp);
......@@ -696,7 +696,11 @@ gih_load_image (gchar *filename)
gimp_progress_update ((gdouble) i / (gdouble) num_of_brushes);
}
/* Some code to attach the paramstring as parasite.
Commented out at the moment since we do not load the pipe
as specified and attaching this data breaks saving.
while (*paramstring && isspace (*paramstring))
paramstring++;
......@@ -704,11 +708,14 @@ gih_load_image (gchar *filename)
{
pipe_parasite = gimp_parasite_new ("gimp-brush-pipe-parameters",
GIMP_PARASITE_PERSISTENT,
strlen (paramstring) + 1, paramstring);
strlen (paramstring) + 1,
paramstring);
gimp_image_parasite_attach (image_ID, pipe_parasite);
gimp_parasite_free (pipe_parasite);
}
*/
g_string_free (buffer, TRUE);
return image_ID;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment