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_bpp Returns the bytes per pixel.
gimp_drawable_bytes This procedure is deprecated! Use 'gimp_drawable_bpp' instead.
gimp_drawable_delete Delete a drawable.
gimp_drawable_fill Fill the drawable with the specified fill mode.
gimp_drawable_foreground_extract Extract the foreground of a drawable using a given trimap.
gimp_drawable_get_image Returns the drawable's image.
gimp_drawable_get_linked Get the linked state of the specified drawable.
gimp_drawable_get_name Get the name of the specified drawable.
gimp_drawable_get_pixel Gets the value of the pixel at the specified coordinates.
gimp_drawable_get_tattoo Get the tattoo of the specified drawable.
gimp_drawable_get_visible Get the visibility of the specified drawable.
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 This procedure is deprecated! Use 'gimp_drawable_get_image' instead.
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_mask_intersect 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_offset Offset the drawable by the specified amounts in the X and Y directions
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 This procedure is deprecated!
gimp_drawable_set_linked Set the linked state of the specified drawable.
gimp_drawable_set_name Set the name of the specified drawable.
gimp_drawable_set_pixel Sets the value of the pixel at the specified coordinates.
gimp_drawable_set_tattoo Set the tattoo of the specified drawable.
gimp_drawable_set_visible Set the visibility of the specified drawable.
gimp_drawable_sub_thumbnail Get a thumbnail of a sub-area of a drawable drawable.
gimp_drawable_thumbnail Get a thumbnail of a drawable.
gimp_drawable_transform_2d Transform the specified drawable in 2d, with extra parameters.
gimp_drawable_transform_2d_default Transform the specified drawable in 2d, with extra parameters.
gimp_drawable_transform_flip Flip the specified drawable around a given line.
gimp_drawable_transform_flip_default Flip the specified drawable around a given line.
gimp_drawable_transform_flip_simple Flip the specified drawable either vertically or horizontally.
gimp_drawable_transform_matrix Transform the specified drawable in 2d, with extra parameters.
gimp_drawable_transform_matrix_default Transform the specified drawable in 2d, with extra parameters.
gimp_drawable_transform_perspective Perform a possibly non-affine transformation on the specified drawable, with extra parameters.
gimp_drawable_transform_perspective_default Perform a possibly non-affine transformation on the specified drawable, with extra parameters.
gimp_drawable_transform_rotate Rotate the specified drawable about given coordinates through the specified angle.
gimp_drawable_transform_rotate_default Rotate the specified drawable about given coordinates through the specified angle.
gimp_drawable_transform_rotate_simple Rotate the specified drawable about given coordinates through the specified angle.
gimp_drawable_transform_scale Scale the specified drawable with extra parameters
gimp_drawable_transform_scale_default Scale the specified drawable with extra parameters
gimp_drawable_transform_shear Shear the specified drawable about its center by the specified magnitude, with extra parameters.
gimp_drawable_transform_shear_default Shear the specified drawable about its center by the specified magnitude, with extra parameters.
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 This procedure is deprecated! Use 'gimp_image_get_active_drawable' instead.
gimp_image_get_active_drawable Get the image's active drawable
gimp_layer_new_from_drawable Create a new layer by copying an existing drawable.
plug_in_drawable_compose Compose an image from multiple drawables of gray images

gimp_drawable_bpp

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32bppBytes 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_bytes

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32bppBytes per pixel
This procedure is deprecated! Use 'gimp_drawable_bpp' instead.
;

gimp_drawable_delete

Input:
DRAWABLEdrawableThe drawable to delete
Returns: nothing
This procedure deletes the specified drawable. This must not be done if the gimage containing this drawable was already deleted or if the drawable was already removed from the image. The only case in which this procedure is useful is if you want to get rid of a drawable which has not yet been added to an image.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_fill

Input:
DRAWABLEdrawableThe drawable
INT32fill_typeThe type of fill: GIMP_FOREGROUND_FILL (0), GIMP_BACKGROUND_FILL (1), GIMP_WHITE_FILL (2), GIMP_TRANSPARENT_FILL (3), GIMP_PATTERN_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_foreground_extract

Input:
DRAWABLEdrawableThe drawable
DRAWABLEmaskTri-Map
Returns: nothing
Image Segmentation by Uniform Color Clustering, see http://www.inf.fu-berlin.de/inst/pubs/tr-b-05-07.pdf
Gerald Friedland; 2005

gimp_drawable_get_image

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

gimp_drawable_get_linked

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32linkedThe drawable linked state (for moves)
This procedure returns the specified drawable's linked state.
Wolfgang Hofer; 1998

gimp_drawable_get_name

Input:
DRAWABLEdrawableThe drawable
Returns:
STRINGnameThe drawable name
This procedure returns the specified drawable's name.
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_get_tattoo

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32tattooThe drawable tattoo
This procedure returns the specified drawable's tattoo. A tattoo is a unique and permanent identifier attached to a drawable that can be used to uniquely identify a drawable within an image even between sessions
Jay Cox; 1998

gimp_drawable_get_visible

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

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 is deprecated! Use 'gimp_drawable_get_image' instead.
;

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:
INT32is_graynon-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:
INT32is_indexednon-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:
INT32is_rgbnon-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 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. Please note that the pixel specified by the lower righthand coordinate of the bounding box is not part of the selection. The selection ends at the upper left corner of this pixel. This means the width of the selection can be calculated as (x2 - x1), its height as (y2 - y1). Note that the returned boolean does NOT correspond with the returned region being empty or not, it always returns whether the selection is non_empty. See gimp_drawable_mask_intersect() for a boolean return value which is more useful in most cases.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_mask_intersect

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32non_emptyTRUE if the returned area is not empty
INT32xx coordinate of the upper left corner of the intersection
INT32yy coordinate of the upper left corner of the intersection
INT32widthwidth of the intersection
INT32heightheight of the intersection
This procedure returns whether there is an intersection between the drawable and the selection. Unlike gimp_drawable_mask_bounds(), the intersection's bounds are returned as x, y, width, height. If there is no selection this function returns TRUE and the returned bounds are the extents of the whole drawable.
Michael Natterer; 2004

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_offset

Input:
DRAWABLEdrawableThe drawable to offset
INT32wrap_aroundwrap image around or fill vacated regions
INT32fill_typefill vacated regions of drawable with background or transparent: GIMP_OFFSET_BACKGROUND (0) or GIMP_OFFSET_TRANSPARENT (1)
INT32offset_xoffset by this amount in X direction
INT32offset_yoffset by this amount in Y direction
Returns: nothing
This procedure offsets the specified drawable by the amounts specified by 'offset_x' and 'offset_y'. If 'wrap_around' is set to TRUE, then portions of the drawable which are offset out of bounds are wrapped around. Alternatively, the undefined regions of the drawable can be filled with transparency or the background color, as specified by the 'fill_type' parameter.
Spencer Kimball & Peter Mattis; 1997

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
This procedure is deprecated!
;

gimp_drawable_set_linked

Input:
DRAWABLEdrawableThe drawable
INT32linkedThe new drawable linked state
Returns: nothing
This procedure sets the specified drawable's linked state.
Wolfgang Hofer; 1998

gimp_drawable_set_name

Input:
DRAWABLEdrawableThe drawable
STRINGnameThe new drawable name
Returns: nothing
This procedure sets the specified drawable's name.
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 specified drawable. Note that this function is not undoable, you should use it only on drawables you just created yourself.
Spencer Kimball & Peter Mattis; 1997

gimp_drawable_set_tattoo

Input:
DRAWABLEdrawableThe drawable
INT32tattooThe new drawable tattoo
Returns: nothing
This procedure sets the specified drawable's tattoo. A tattoo is a unique and permanent identifier attached to a drawable that can be used to uniquely identify a drawable within an image even between sessions
Jay Cox; 1998

gimp_drawable_set_visible

Input:
DRAWABLEdrawableThe drawable
INT32visibleThe new drawable visibility
Returns: nothing
This procedure sets the specified drawable's visibility.
Spencer Kimball & Peter Mattis; 1995-1996

gimp_drawable_sub_thumbnail

Input:
DRAWABLEdrawableThe drawable
INT32src_xThe x coordinate of the area
INT32src_yThe y coordinate of the area
INT32src_widthThe width of the area
INT32src_heightThe height of the area
INT32dest_widthThe thumbnail width
INT32dest_heightThe thumbnail height
Returns:
INT32widthThe previews width
INT32heightThe previews height
INT32bppThe previews bpp
INT32thumbnail_data_countThe number of bytes 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 512 pixels. The pixels are returned in RGB[A] or GRAY[A] format. The bpp return value gives the number of bytes in the image.
Michael Natterer <mitch@gimp.org>; 2004

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 bytes 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 512 pixels. The pixels are returned in RGB[A] or GRAY[A] format. The bpp return value gives the number of bytes in the image.
Andy Thomas; 1999

gimp_drawable_transform_2d

Input:
DRAWABLEdrawableThe affected drawable
SUCCESSsource_xX coordinate of the transformation center
SUCCESSsource_yY coordinate of the transformation center
SUCCESSscale_xAmount to scale in x direction
SUCCESSscale_yAmount to scale in y direction
SUCCESSangleThe angle of rotation (radians)
SUCCESSdest_xX coordinate of where the center goes
SUCCESSdest_yY coordinate of where the center goes
INT32transform_directionDirection of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) }
INT32interpolationType of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) }
INT32supersampleWhether to perform supersample
INT32recursion_levelLevel of recursion (3 is a nice default)
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe transformed drawable
This procedure transforms the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then transformed. The transformation is done by scaling the image by the x and y scale factors about the point (source_x, source_y), then rotating around the same point, then translating that point to the new position (dest_x, dest_y). The return value is the ID of the rotated drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and transformed drawable.
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_2d_default

Input:
DRAWABLEdrawableThe affected drawable
SUCCESSsource_xX coordinate of the transformation center
SUCCESSsource_yY coordinate of the transformation center
SUCCESSscale_xAmount to scale in x direction
SUCCESSscale_yAmount to scale in y direction
SUCCESSangleThe angle of rotation (radians)
SUCCESSdest_xX coordinate of where the center goes
SUCCESSdest_yY coordinate of where the center goes
INT32interpolateWhether to use interpolation and supersampling
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe transformed drawable
This procedure is a variant of gimp_drawable_transform_2d() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_flip

Input:
DRAWABLEdrawableThe affected drawable
SUCCESSx0horz. coord. of one end of axis
SUCCESSy0vert. coord. of one end of axis
SUCCESSx1horz. coord. of other end of axis
SUCCESSy1vert. coord. of other end of axis
INT32transform_directionDirection of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) }
INT32interpolationType of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) }
INT32supersampleWhether to perform supersample
INT32recursion_levelLevel of recursion (3 is a nice default)
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe flipped drawable
This procedure flips the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then flipped. The axis to flip around is specified by specifying two points from that line. The return value is the ID of the flipped drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and flipped drawable. The clip results parameter specifies wheter current selection will affect the transform.
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_flip_default

Input:
DRAWABLEdrawableThe affected drawable
SUCCESSx0horz. coord. of one end of axis
SUCCESSy0vert. coord. of one end of axis
SUCCESSx1horz. coord. of other end of axis
SUCCESSy1vert. coord. of other end of axis
INT32interpolateWhether to use interpolation and supersampling
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe flipped drawable
This procedure is a variant of gimp_drawable_transform_flip() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_flip_simple

Input:
DRAWABLEdrawableThe affected drawable
INT32flip_typeType of flip: GIMP_ORIENTATION_HORIZONTAL (0) or GIMP_ORIENTATION_VERTICAL (1)
INT32auto_centerWhether to automatically position the axis in the selection center
SUCCESSaxiscoord. of flip axis
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe flipped drawable
This procedure flips the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then flipped. If auto_center is set to true, the flip is around the selection's center. Otherwise, the coordinate of the axis needs to be specified. The return value is the ID of the flipped drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and flipped drawable.
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_matrix

Input:
DRAWABLEdrawableThe affected drawable
SUCCESScoeff_0_0coefficient (0,0) of the transformation matrix
SUCCESScoeff_0_1coefficient (0,1) of the transformation matrix
SUCCESScoeff_0_2coefficient (0,2) of the transformation matrix
SUCCESScoeff_1_0coefficient (1,0) of the transformation matrix
SUCCESScoeff_1_1coefficient (1,1) of the transformation matrix
SUCCESScoeff_1_2coefficient (1,2) of the transformation matrix
SUCCESScoeff_2_0coefficient (2,0) of the transformation matrix
SUCCESScoeff_2_1coefficient (2,1) of the transformation matrix
SUCCESScoeff_2_2coefficient (2,2) of the transformation matrix
INT32transform_directionDirection of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) }
INT32interpolationType of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) }
INT32supersampleWhether to perform supersample
INT32recursion_levelLevel of recursion (3 is a nice default)
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe transformed drawable
This procedure transforms the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then transformed. The transformation is done by assembling a 3x3 matrix from the coefficients passed. The return value is the ID of the rotated drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and transformed drawable.
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_matrix_default

Input:
DRAWABLEdrawableThe affected drawable
SUCCESScoeff_0_0coefficient (0,0) of the transformation matrix
SUCCESScoeff_0_1coefficient (0,1) of the transformation matrix
SUCCESScoeff_0_2coefficient (0,2) of the transformation matrix
SUCCESScoeff_1_0coefficient (1,0) of the transformation matrix
SUCCESScoeff_1_1coefficient (1,1) of the transformation matrix
SUCCESScoeff_1_2coefficient (1,2) of the transformation matrix
SUCCESScoeff_2_0coefficient (2,0) of the transformation matrix
SUCCESScoeff_2_1coefficient (2,1) of the transformation matrix
SUCCESScoeff_2_2coefficient (2,2) of the transformation matrix
INT32interpolateWhether to use interpolation and supersampling
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe transformed drawable
This procedure is a variant of gimp_drawable_transform_matrix() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_perspective

Input:
DRAWABLEdrawableThe affected drawable
SUCCESSx0The new x coordinate of upper-left corner of original bounding box
SUCCESSy0The new y coordinate of upper-left corner of original bounding box
SUCCESSx1The new x coordinate of upper-right corner of original bounding box
SUCCESSy1The new y coordinate of upper-right corner of original bounding box
SUCCESSx2The new x coordinate of lower-left corner of original bounding box
SUCCESSy2The new y coordinate of lower-left corner of original bounding box
SUCCESSx3The new x coordinate of lower-right corner of original bounding box
SUCCESSy3The new y coordinate of lower-right corner of original bounding box
INT32transform_directionDirection of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) }
INT32interpolationType of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) }
INT32supersampleWhether to perform supersample
INT32recursion_levelLevel of recursion (3 is a nice default)
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe newly mapped drawable
This procedure performs a possibly non-affine transformation on the specified drawable by allowing the corners of the original bounding box to be arbitrarily remapped to any values. The specified drawable is remapped if no selection exists. However, if a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then remapped as specified. The return value is the ID of the remapped drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and remapped drawable. The 4 coordinates specify the new locations of each corner of the original bounding box. By specifying these values, any affine transformation (rotation, scaling, translation) can be affected. Additionally, these values can be specified such that the resulting transformed drawable will appear to have been projected via a perspective transform.
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_perspective_default

Input:
DRAWABLEdrawableThe affected drawable
SUCCESSx0The new x coordinate of upper-left corner of original bounding box
SUCCESSy0The new y coordinate of upper-left corner of original bounding box
SUCCESSx1The new x coordinate of upper-right corner of original bounding box
SUCCESSy1The new y coordinate of upper-right corner of original bounding box
SUCCESSx2The new x coordinate of lower-left corner of original bounding box
SUCCESSy2The new y coordinate of lower-left corner of original bounding box
SUCCESSx3The new x coordinate of lower-right corner of original bounding box
SUCCESSy3The new y coordinate of lower-right corner of original bounding box
INT32interpolateWhether to use interpolation and supersampling
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe newly mapped drawable
This procedure is a variant of gimp_drawable_transform_perspective() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_rotate

Input:
DRAWABLEdrawableThe affected drawable
SUCCESSangleThe angle of rotation (radians)
INT32auto_centerWhether to automatically rotate around the selection center
INT32center_xThe hor. coordinate of the center of rotation
INT32center_yThe vert. coordinate of the center of rotation
INT32transform_directionDirection of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) }
INT32interpolationType of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) }
INT32supersampleWhether to perform supersample
INT32recursion_levelLevel of recursion (3 is a nice default)
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe rotated drawable
This function rotates the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then rotated by the specified amount. The return value is the ID of the rotated drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and rotated drawable.
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_rotate_default

Input:
DRAWABLEdrawableThe affected drawable
SUCCESSangleThe angle of rotation (radians)
INT32auto_centerWhether to automatically rotate around the selection center
INT32center_xThe hor. coordinate of the center of rotation
INT32center_yThe vert. coordinate of the center of rotation
INT32interpolateWhether to use interpolation and supersampling
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe rotated drawable
This procedure is a variant of gimp_drawable_transform_rotate() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_rotate_simple

Input:
DRAWABLEdrawableThe affected drawable
INT32rotate_typeType of rotation: GIMP_ROTATE_90 (0), GIMP_ROTATE_180 (1), GIMP_ROTATE_270 (2)
INT32auto_centerWhether to automatically rotate around the selection center
INT32center_xThe hor. coordinate of the center of rotation
INT32center_yThe vert. coordinate of the center of rotation
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe rotated drawable
This function rotates the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then rotated by the specified amount. The return value is the ID of the rotated drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and rotated drawable.
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_scale

Input:
DRAWABLEdrawableThe affected drawable
SUCCESSx0The new x coordinate of upper-left corner of newly scaled region
SUCCESSy0The new y coordinate of upper-left corner of newly scaled region
SUCCESSx1The new x coordinate of lower-right corner of newly scaled region
SUCCESSy1The new y coordinate of lower-right corner of newly scaled region
INT32transform_directionDirection of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) }
INT32interpolationType of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) }
INT32supersampleWhether to perform supersample
INT32recursion_levelLevel of recursion (3 is a nice default)
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe scaled drawable
This procedure scales the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then scaled by the specified amount. The return value is the ID of the scaled drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and scaled drawable.
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_scale_default

Input:
DRAWABLEdrawableThe affected drawable
SUCCESSx0The new x coordinate of upper-left corner of newly scaled region
SUCCESSy0The new y coordinate of upper-left corner of newly scaled region
SUCCESSx1The new x coordinate of lower-right corner of newly scaled region
SUCCESSy1The new y coordinate of lower-right corner of newly scaled region
INT32interpolateWhether to use interpolation and supersampling
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe scaled drawable
This procedure is a variant of gimp_drawable_transform_scale() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_shear

Input:
DRAWABLEdrawableThe affected drawable
INT32shear_typeType of shear: GIMP_ORIENTATION_HORIZONTAL (0) or GIMP_ORIENTATION_VERTICAL (1)
SUCCESSmagnitudeThe magnitude of the shear
INT32transform_directionDirection of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) }
INT32interpolationType of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2), GIMP_INTERPOLATION_LANCZOS (3) }
INT32supersampleWhether to perform supersample
INT32recursion_levelLevel of recursion (3 is a nice default)
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe sheared drawable
This procedure shears the specified drawable if no selection exists. If a selection exists, the portion of the drawable which lies under the selection is cut from the drawable and made into a floating selection which is then sheard by the specified amount. The return value is the ID of the sheard drawable. If there was no selection, this will be equal to the drawable ID supplied as input. Otherwise, this will be the newly created and sheard drawable. The shear type parameter indicates whether the shear will be applied horizontally or vertically. The magnitude can be either positive or negative and indicates the extent (in pixels) to shear by.
João S. O. Bueno Calligaris; 2004

gimp_drawable_transform_shear_default

Input:
DRAWABLEdrawableThe affected drawable
INT32shear_typeType of shear: GIMP_ORIENTATION_HORIZONTAL (0) or GIMP_ORIENTATION_VERTICAL (1)
SUCCESSmagnitudeThe magnitude of the shear
INT32interpolateWhether to use interpolation and supersampling
INT32clip_resultWhether to clip results
Returns:
DRAWABLEdrawableThe sheared drawable
This procedure is a variant of gimp_drawable_transform_shear() which uses no interpolation/supersampling at all, or default values (depending on the 'interpolate' parameter).
João S. O. Bueno Calligaris; 2004

gimp_drawable_type

Input:
DRAWABLEdrawableThe drawable
Returns:
INT32typeThe drawable's type: { GIMP_RGB_IMAGE (0), GIMP_RGBA_IMAGE (1), GIMP_GRAY_IMAGE (2), GIMP_GRAYA_IMAGE (3), GIMP_INDEXED_IMAGE (4), GIMP_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: { GIMP_RGB_IMAGE (0), GIMP_RGBA_IMAGE (1), GIMP_GRAY_IMAGE (2), GIMP_GRAYA_IMAGE (3), GIMP_INDEXED_IMAGE (4), GIMP_INDEXEDA_IMAGE (5) }
This procedure returns the drawable's type as if had an alpha channel. 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 using (0, 0, width, 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 is deprecated! Use 'gimp_image_get_active_drawable' instead.
;

gimp_image_get_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

gimp_layer_new_from_drawable

Input:
DRAWABLEdrawableThe source drawable from where the new layer is copied
IMAGEdest_imageThe destination image to which to add the layer
Returns:
LAYERlayer_copyThe newly copied layer
This procedure creates a new layer as a copy of the specified drawable. The new layer still needs to be added to the image, as this is not automatic. Add the new layer with the 'gimp_image_add_layer' command. Other attributes such as layer mask modes, and offsets should be set with explicit procedure calls.
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 2.3.2 (win32)Documentation fresh from PDB22:53:15 Fr 22.07.2005
Generated by pdb2doc.py written by Hans Breuer <Hans@Breuer.org>