See also: Main Index; Alphabetic; Misc; By Author; By Module; By Menu    External Links: The Gimp; Gimp User Manual

The Gimp drawable functions

gimp_drawable_bytes Returns the bytes per pixel.
gimp_drawable_fill Fill the drawable with the specified fill mode.
gimp_drawable_get_pixel Gets the value of the pixel at the specified coordinates.
gimp_drawable_has_alpha Returns non-zero if the drawable has an alpha channel.
gimp_drawable_height Returns the height of the drawable.
gimp_drawable_image Returns the drawable's image.
gimp_drawable_is_channel Returns whether the drawable is a channel.
gimp_drawable_is_gray Returns whether the drawable is a grayscale type.
gimp_drawable_is_indexed Returns whether the drawable is an indexed type.
gimp_drawable_is_layer Returns whether the drawable is a layer.
gimp_drawable_is_layer_mask Returns whether the drawable is a layer mask.
gimp_drawable_is_rgb Returns whether the drawable is an RGB type.
gimp_drawable_mask_bounds Find the bounding box of the current selection in relation to the specified drawable.
gimp_drawable_merge_shadow Merge the shadow buffer with the specified drawable.
gimp_drawable_offsets Returns the offsets for the drawable.
gimp_drawable_parasite_attach Add a parasite to a drawable.
gimp_drawable_parasite_detach Removes a parasite from a drawable.
gimp_drawable_parasite_find Finds the named parasite in a drawable
gimp_drawable_parasite_list List all parasites.
gimp_drawable_set_image Set image where drawable belongs to.
gimp_drawable_set_pixel Sets the value of the pixel at the specified coordinates.
gimp_drawable_thumbnail Get a thumbnail of a drawable.
gimp_drawable_type Returns the drawable's type.
gimp_drawable_type_with_alpha Returns the drawable's type with alpha.
gimp_drawable_update Update the specified region of the drawable.
gimp_drawable_width Returns the width of the drawable.
gimp_image_active_drawable Get the image's active drawable
plug_in_drawable_compose Compose an image from multiple drawables of gray images

gimp_drawable_bytes

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32bytesBytes per pixel
This procedure returns the number of bytes per pixel (or the number of channels) for the specified drawable.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_fill

Input:
DRAWABLEdrawableThe drawable
INT32fill_typeThe type of fill: FG_IMAGE_FILL (0), BG_IMAGE_FILL (1), WHITE_IMAGE_FILL (2), TRANS_IMAGE_FILL (3), NO_IMAGE_FILL (4)
Returns: nothing
This procedure fills the drawable with the fill mode. If the fill mode is foreground the current foreground color is used. If the fill mode is background, the current background color is used. If the fill type is white, then white is used. Transparent fill only affects layers with an alpha channel, in which case the alpha channel is set to transparent. If the drawable has no alpha channel, it is filled to white. No fill leaves the drawable's contents undefined. This procedure is unlike the bucket fill tool because it fills regardless of a selection
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_get_pixel

Input:
DRAWABLEdrawableThe drawable
INT32x_coordThe x coordinate
INT32y_coordThe y coordinate
Returns:
INT32num_channelsThe number of channels for the pixel
INT8ARRAYpixelThe pixel value
This procedure gets the pixel value at the specified coordinates. The 'num_channels' argument must always be equal to the bytes-per-pixel value for the specified drawable.
Spencer Kimball & Peter Mattis; 1997

gimp_drawable_has_alpha

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32has_alphaDoes the drawable have an alpha channel?
This procedure returns whether the specified drawable has an alpha channel. This can only be true for layers, and the associated type will be one of: { RGBA , GRAYA, INDEXEDA }.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_height

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32heightHeight of drawable
This procedure returns the specified drawable's height in pixels.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_image

Input:
DRAWABLEdrawableThe drawable
Returns:
IMAGEimageThe drawable's image
This procedure returns the drawable's image.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_is_channel

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32channelNon-zero if the drawable is a channel
This procedure returns non-zero if the specified drawable is a channel.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_is_gray

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32graynon-zero if the drawable is a grayscale type
This procedure returns non-zero if the specified drawable is of type { Gray, GrayA }.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_is_indexed

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32indexednon-zero if the drawable is an indexed type
This procedure returns non-zero if the specified drawable is of type { Indexed, IndexedA }.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_is_layer

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32layerNon-zero if the drawable is a layer
This procedure returns non-zero if the specified drawable is a layer.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_is_layer_mask

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32layer_maskNon-zero if the drawable is a layer mask
This procedure returns non-zero if the specified drawable is a layer mask.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_is_rgb

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32colornon-zero if the drawable is an RGB type
This procedure returns non-zero if the specified drawable is of type { RGB, RGBA }.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_mask_bounds

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32non_emptyTRUE if there is a selection
INT32x1x coordinate of the upper left corner of selection bounds
INT32y1y coordinate of the upper left corner of selection bounds
INT32x2x coordinate of the lower right corner of selection bounds
INT32y2y coordinate of the lower right corner of selection bounds
This procedure returns the whether there is a selection. If there is one, the upper left and lower righthand corners of its bounding box are returned. These coordinates are specified relative to the drawable's origin, and bounded by the drawable's extents.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_merge_shadow

Input:
DRAWABLEdrawableThe drawable
INT32undoPush merge to undo stack?
Returns: nothing
This procedure combines the contents of the image's shadow buffer (for temporary processing) with the specified drawable. The "undo" parameter specifies whether to add an undo step for the operation. Requesting no undo is useful for such applications as 'auto-apply'.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_offsets

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32offset_xx offset of drawable
INT32offset_yy offset of drawable
This procedure returns the specified drawable's offsets. This only makes sense if the drawable is a layer since channels are anchored. The offsets of a channel will be returned as 0.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_set_image

Input:
DRAWABLEdrawableThe drawable
IMAGEimageThe image
Returns: nothing
Set the image the drawable should be a part of (Use this before adding a drawable to another image).
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_set_pixel

Input:
DRAWABLEdrawableThe drawable
INT32x_coordThe x coordinate
INT32y_coordThe y coordinate
INT32num_channelsThe number of channels for the pixel
INT8ARRAYpixelThe pixel value
Returns: nothing
This procedure sets the pixel value at the specified coordinates. The 'num_channels' argument must always be equal to the bytes-per-pixel value for the spec ified drawable.
Spencer Kimball & Peter Mattis; 1997

gimp_drawable_thumbnail

Input:
DRAWABLEdrawableThe drawable
INT32widthThe thumbnail width
INT32heightThe thumbnail height
Returns:
INT32widthThe previews width
INT32heightThe previews height
INT32bppThe previews bpp
INT32thumbnail_data_countThe number of pixels in thumbnail data
INT8ARRAYthumbnail_dataThe thumbnail data
This function gets data from which a thumbnail of a drawable preview can be created. Maximum x or y dimension is 128 pixels. The pixels are returned in the RGB[A] format. The bpp return value gives the number of bytes in the image. The alpha channel also returned if the drawable has one.
Andy Thomas; 1999

gimp_drawable_type

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32typeThe drawable's type: { RGB_IMAGE (0), RGBA_IMAGE (1), GRAY_IMAGE (2), GRAYA_IMAGE (3), INDEXED_IMAGE (4), INDEXEDA_IMAGE (5) }
This procedure returns the drawable's type.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_type_with_alpha

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32type_with_alphaThe drawable's type with alpha: { RGBA_IMAGE (1), GRAYA_IMAGE (3), INDEXEDA_IMAGE (5) }
This procedure returns the drawable's type if an alpha channel were added. If the type is currently Gray, for instance, the returned type would be GrayA. If the drawable already has an alpha channel, the drawable's type is simply returned.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_update

Input:
DRAWABLEdrawableThe drawable
INT32xx coordinate of upper left corner of update region
INT32yy coordinate of upper left corner of update region
INT32widthWidth of update region
INT32heightHeight of update region
Returns: nothing
This procedure updates the specified region of the drawable. The (x, y) coordinate pair is relative to the drawable's origin, not to the image origin. Therefore, the entire drawable can be updated with: {x->0, y->0, w->width, h->height }.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_width

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32widthWidth of drawable
This procedure returns the specified drawable's width in pixels.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_image_active_drawable

Input:
IMAGEimageThe image
Returns:
DRAWABLEdrawableThe active drawable
This procedure returns the ID of the image's active drawable. This can be either a layer, a channel, or a layer mask. The active drawable is specified by the active image channel. If that is -1, then by the active image layer. If the active image layer has a layer mask and the layer mask is in edit mode, then the layer mask is the active drawable.
Spencer Kimball & Peter Mattis; 1995-1996

plug_in_drawable_compose

Input:
INT32run_modeInteractive, non-interactive
IMAGEimage1First input image (not used)
DRAWABLEdrawable1First input drawable
DRAWABLEdrawable2Second input drawable
DRAWABLEdrawable3Third input drawable
DRAWABLEdrawable4Fourth input drawable
STRINGcompose_typeWhat to compose: RGB, RGBA, HSV, CMY, CMYK
Returns:
IMAGEnew_imageOutput image
This function creates a new image from multiple drawables of gray images
Peter Kirchgessner (peter@kirchgessner.net); 1998


The Gimp 1.2.5 (win32)Documentation fresh from PDB12:10:10 Do 19.06.03
Generated by pdb2doc.py written by Hans Breuer <Hans(at)Breuer.org>