gimpimage

Name

gimpimage -- 

Synopsis



gint*       gimp_image_list                 (gint *num_images);
gint32      gimp_image_new                  (gint width,
                                             gint height,
                                             GimpImageBaseType type);
gboolean    gimp_image_resize               (gint32 image_ID,
                                             gint new_width,
                                             gint new_height,
                                             gint offx,
                                             gint offy);
gboolean    gimp_image_scale                (gint32 image_ID,
                                             gint new_width,
                                             gint new_height);
gboolean    gimp_image_delete               (gint32 image_ID);
gboolean    gimp_image_free_shadow          (gint32 image_ID);
gint*       gimp_image_get_layers           (gint32 image_ID,
                                             gint *num_layers);
gint*       gimp_image_get_channels         (gint32 image_ID,
                                             gint *num_channels);
gboolean    gimp_image_unset_active_channel (gint32 image_ID);
gint32      gimp_image_pick_correlate_layer (gint32 image_ID,
                                             gint x,
                                             gint y);
gboolean    gimp_image_raise_layer          (gint32 image_ID,
                                             gint32 layer_ID);
gboolean    gimp_image_lower_layer          (gint32 image_ID,
                                             gint32 layer_ID);
gboolean    gimp_image_raise_layer_to_top   (gint32 image_ID,
                                             gint32 layer_ID);
gboolean    gimp_image_lower_layer_to_bottom
                                            (gint32 image_ID,
                                             gint32 layer_ID);
gint32      gimp_image_merge_visible_layers (gint32 image_ID,
                                             GimpMergeType merge_type);
gint32      gimp_image_merge_down           (gint32 image_ID,
                                             gint32 merge_layer_ID,
                                             GimpMergeType merge_type);
gint32      gimp_image_flatten              (gint32 image_ID);
gboolean    gimp_image_add_layer            (gint32 image_ID,
                                             gint32 layer_ID,
                                             gint position);
gboolean    gimp_image_remove_layer         (gint32 image_ID,
                                             gint32 layer_ID);
gboolean    gimp_image_add_layer_mask       (gint32 image_ID,
                                             gint32 layer_ID,
                                             gint32 mask_ID);
gboolean    gimp_image_remove_layer_mask    (gint32 image_ID,
                                             gint32 layer_ID,
                                             GimpMaskApplyMode mode);
gboolean    gimp_image_raise_channel        (gint32 image_ID,
                                             gint32 channel_ID);
gboolean    gimp_image_lower_channel        (gint32 image_ID,
                                             gint32 layer_ID);
gboolean    gimp_image_add_channel          (gint32 image_ID,
                                             gint32 channel_ID,
                                             gint position);
gboolean    gimp_image_remove_channel       (gint32 image_ID,
                                             gint32 channel_ID);
gint32      gimp_image_active_drawable      (gint32 image_ID);
GimpImageBaseType gimp_image_base_type      (gint32 image_ID);
gboolean    gimp_image_undo_is_enabled      (gint32 image_ID);
gboolean    gimp_image_undo_enable          (gint32 image_ID);
gboolean    gimp_image_undo_disable         (gint32 image_ID);
gboolean    gimp_image_undo_freeze          (gint32 image_ID);
gboolean    gimp_image_undo_thaw            (gint32 image_ID);
gboolean    gimp_image_clean_all            (gint32 image_ID);
gint32      gimp_image_floating_selection   (gint32 image_ID);
gint32      gimp_image_floating_sel_attached_to
                                            (gint32 image_ID);
gboolean    gimp_image_set_tattoo_state     (gint32 image_ID,
                                             gint tattoo);
gint        gimp_image_get_tattoo_state     (gint32 image_ID);
gint        gimp_image_width                (gint32 image_ID);
gint        gimp_image_height               (gint32 image_ID);
gint32      gimp_image_get_active_layer     (gint32 image_ID);
gboolean    gimp_image_set_active_layer     (gint32 image_ID,
                                             gint32 active_layer_ID);
gint32      gimp_image_get_active_channel   (gint32 image_ID);
gboolean    gimp_image_set_active_channel   (gint32 image_ID,
                                             gint32 active_channel_ID);
gint32      gimp_image_get_selection        (gint32 image_ID);
gboolean    gimp_image_get_component_active (gint32 image_ID,
                                             GimpChannelType component);
gboolean    gimp_image_set_component_active (gint32 image_ID,
                                             GimpChannelType component,
                                             gboolean active);
gboolean    gimp_image_get_component_visible
                                            (gint32 image_ID,
                                             GimpChannelType component);
gboolean    gimp_image_set_component_visible
                                            (gint32 image_ID,
                                             GimpChannelType component,
                                             gboolean visible);
gchar*      gimp_image_get_filename         (gint32 image_ID);
gboolean    gimp_image_set_filename         (gint32 image_ID,
                                             gchar *filename);
gboolean    gimp_image_get_resolution       (gint32 image_ID,
                                             gdouble *xresolution,
                                             gdouble *yresolution);
gboolean    gimp_image_set_resolution       (gint32 image_ID,
                                             gdouble xresolution,
                                             gdouble yresolution);
GimpUnit    gimp_image_get_unit             (gint32 image_ID);
gboolean    gimp_image_set_unit             (gint32 image_ID,
                                             GimpUnit unit);
gint32      gimp_image_get_layer_by_tattoo  (gint32 image_ID,
                                             gint tattoo);
gint32      gimp_image_get_channel_by_tattoo
                                            (gint32 image_ID,
                                             gint tattoo);
guchar*     gimp_image_get_cmap             (gint32 image_ID,
                                             gint *num_colors);
gboolean    gimp_image_set_cmap             (gint32 image_ID,
                                             guchar *cmap,
                                             gint num_colors);
guchar*     gimp_image_get_thumbnail_data   (gint32 image_ID,
                                             gint *width,
                                             gint *height,
                                             gint *bpp);
#define     gimp_image_convert_rgb
#define     gimp_image_convert_grayscale
#define     gimp_image_convert_indexed
#define     gimp_image_duplicate

Description

Details

gimp_image_list ()

gint*       gimp_image_list                 (gint *num_images);

Returns the list of images currently open.

This procedure returns the list of images currently open in the GIMP.

num_images : The number of images currently open.
Returns : The list of images currently open.


gimp_image_new ()

gint32      gimp_image_new                  (gint width,
                                             gint height,
                                             GimpImageBaseType type);

Creates a new image with the specified width, height, and type.

Creates a new image, undisplayed with the specified extents and type. A layer should be created and added before this image is displayed, or subsequent calls to 'gimp_display_new' with this image as an argument will fail. Layers can be created using the 'gimp_layer_new' commands. They can be added to an image using the 'gimp_image_add_layer' command.

width : The width of the image.
height : The height of the image.
type : The type of image.
Returns : The ID of the newly created image.


gimp_image_resize ()

gboolean    gimp_image_resize               (gint32 image_ID,
                                             gint new_width,
                                             gint new_height,
                                             gint offx,
                                             gint offy);

Resize the image to the specified extents.

This procedure resizes the image so that it's new width and height are equal to the supplied parameters. Offsets are also provided which describe the position of the previous image's content. No bounds checking is currently provided, so don't supply parameters that are out of bounds. All channels within the image are resized according to the specified parameters; this includes the image selection mask. All layers within the image are repositioned according to the specified offsets.

image_ID : The image.
new_width : New image width.
new_height : New image height.
offx : x offset between upper left corner of old and new images: (new - old).
offy : y offset between upper left corner of old and new images: (new - old).
Returns : TRUE on success.


gimp_image_scale ()

gboolean    gimp_image_scale                (gint32 image_ID,
                                             gint new_width,
                                             gint new_height);

Scale the image to the specified extents.

This procedure scales the image so that it's new width and height are equal to the supplied parameters. Offsets are also provided which describe the position of the previous image's content. No bounds checking is currently provided, so don't supply parameters that are out of bounds. All channels within the image are scaled according to the specified parameters; this includes the image selection mask. All layers within the image are repositioned according to the specified offsets.

image_ID : The image.
new_width : New image width.
new_height : New image height.
Returns : TRUE on success.


gimp_image_delete ()

gboolean    gimp_image_delete               (gint32 image_ID);

Delete the specified image.

If there are no displays associated with this image it will be deleted. This means that you can not delete an image through the PDB that was created by the user. If the associated display was however created through the PDB and you know the display ID, you may delete the display. Removal of the last associated display will then delete the image.

image_ID : The image.
Returns : TRUE on success.


gimp_image_free_shadow ()

gboolean    gimp_image_free_shadow          (gint32 image_ID);

Free the specified image's shadow data (if it exists).

This procedure is intended as a memory saving device. If any shadow memory has been allocated, it will be freed automatically on a call to 'gimp_image_delete'.

image_ID : The image.
Returns : TRUE on success.


gimp_image_get_layers ()

gint*       gimp_image_get_layers           (gint32 image_ID,
                                             gint *num_layers);

Returns the list of layers contained in the specified image.

This procedure returns the list of layers contained in the specified image. The order of layers is from topmost to bottommost.

image_ID : The image.
num_layers : The number of layers contained in the image.
Returns : The list of layers contained in the image.


gimp_image_get_channels ()

gint*       gimp_image_get_channels         (gint32 image_ID,
                                             gint *num_channels);

Returns the list of channels contained in the specified image.

This procedure returns the list of channels contained in the specified image. This does not include the selection mask, or layer masks. The order is from topmost to bottommost.

image_ID : The image.
num_channels : The number of channels contained in the image.
Returns : The list of channels contained in the image.


gimp_image_unset_active_channel ()

gboolean    gimp_image_unset_active_channel (gint32 image_ID);

Unsets the active channel in the specified image.

If an active channel exists, it is unset. There then exists no active channel, and if desired, one can be set through a call to 'Set Active Channel'. No error is returned in the case of no existing active channel.

image_ID : The image.
Returns : TRUE on success.


gimp_image_pick_correlate_layer ()

gint32      gimp_image_pick_correlate_layer (gint32 image_ID,
                                             gint x,
                                             gint y);

Find the layer visible at the specified coordinates.

This procedure finds the layer which is visible at the specified coordinates. Layers which do not qualify are those whose extents do not pass within the specified coordinates, or which are transparent at the specified coordinates. This procedure will return -1 if no layer is found.

image_ID : The image.
x : The x coordinate for the pick.
y : The y coordinate for the pick.
Returns : The layer found at the specified coordinates.


gimp_image_raise_layer ()

gboolean    gimp_image_raise_layer          (gint32 image_ID,
                                             gint32 layer_ID);

Raise the specified layer in the image's layer stack

This procedure raises the specified layer one step in the existing layer stack. It will not move the layer if there is no layer above it, or the layer has no alpha channel.

image_ID : The image.
layer_ID : The layer to raise.
Returns : TRUE on success.


gimp_image_lower_layer ()

gboolean    gimp_image_lower_layer          (gint32 image_ID,
                                             gint32 layer_ID);

Lower the specified layer in the image's layer stack

This procedure lowers the specified layer one step in the existing layer stack. It will not move the layer if there is no layer below it, or the layer has no alpha channel.

image_ID : The image.
layer_ID : The layer to lower.
Returns : TRUE on success.


gimp_image_raise_layer_to_top ()

gboolean    gimp_image_raise_layer_to_top   (gint32 image_ID,
                                             gint32 layer_ID);

Raise the specified layer in the image's layer stack to top of stack

This procedure raises the specified layer to top of the existing layer stack. It will not move the layer if there is no layer above it, or the layer has no alpha channel.

image_ID : The image.
layer_ID : The layer to raise to top.
Returns : TRUE on success.


gimp_image_lower_layer_to_bottom ()

gboolean    gimp_image_lower_layer_to_bottom
                                            (gint32 image_ID,
                                             gint32 layer_ID);

Lower the specified layer in the image's layer stack to bottom of stack

This procedure lowers the specified layer to bottom of the existing layer stack. It will not move the layer if there is no layer below it, or the layer has no alpha channel.

image_ID : The image.
layer_ID : The layer to lower to bottom.
Returns : TRUE on success.


gimp_image_merge_visible_layers ()

gint32      gimp_image_merge_visible_layers (gint32 image_ID,
                                             GimpMergeType merge_type);

Merge the visible image layers into one.

This procedure combines the visible layers into a single layer using the specified merge type. A merge type of EXPAND_AS_NECESSARY expands the final layer to encompass the areas of the visible layers. A merge type of CLIP_TO_IMAGE clips the final layer to the extents of the image. A merge type of CLIP_TO_BOTTOM_LAYER clips the final layer to the size of the bottommost layer.

image_ID : The image.
merge_type : The type of merge.
Returns : The resulting layer.


gimp_image_merge_down ()

gint32      gimp_image_merge_down           (gint32 image_ID,
                                             gint32 merge_layer_ID,
                                             GimpMergeType merge_type);

Merge the layer passed and the first visible layer below.

This procedure combines the passed layer and the first visible layer below it using the specified merge type. A merge type of EXPAND_AS_NECESSARY expands the final layer to encompass the areas of the visible layers. A merge type of CLIP_TO_IMAGE clips the final layer to the extents of the image. A merge type of CLIP_TO_BOTTOM_LAYER clips the final layer to the size of the bottommost layer.

image_ID : The image.
merge_layer_ID : The layer to merge down from.
merge_type : The type of merge.
Returns : The resulting layer.


gimp_image_flatten ()

gint32      gimp_image_flatten              (gint32 image_ID);

Flatten all visible layers into a single layer. Discard all invisible layers.

This procedure combines the visible layers in a manner analogous to merging with the CLIP_TO_IMAGE merge type. Non-visible layers are discarded, and the resulting image is stripped of its alpha channel.

image_ID : The image.
Returns : The resulting layer.


gimp_image_add_layer ()

gboolean    gimp_image_add_layer            (gint32 image_ID,
                                             gint32 layer_ID,
                                             gint position);

Add the specified layer to the image.

This procedure adds the specified layer to the gimage at the given position. If the position is specified as -1, then the layer is inserted at the top of the layer stack. If the layer to be added has no alpha channel, it must be added at position 0. The layer type must be compatible with the image base type.

image_ID : The image.
layer_ID : The layer.
position : The layer position.
Returns : TRUE on success.


gimp_image_remove_layer ()

gboolean    gimp_image_remove_layer         (gint32 image_ID,
                                             gint32 layer_ID);

Remove the specified layer from the image.

This procedure removes the specified layer from the image. If the layer doesn't exist, an error is returned. If there are no layers left in the image, this call will fail. If this layer is the last layer remaining, the image will become empty and have no active layer.

image_ID : The image.
layer_ID : The layer.
Returns : TRUE on success.


gimp_image_add_layer_mask ()

gboolean    gimp_image_add_layer_mask       (gint32 image_ID,
                                             gint32 layer_ID,
                                             gint32 mask_ID);

Add a layer mask to the specified layer.

This procedure adds a layer mask to the specified layer. Layer masks serve as an additional alpha channel for a layer. This procedure will fail if a number of prerequisites aren't met. The layer cannot already have a layer mask. The specified mask must exist and have the same dimensions as the layer. Both the mask and the layer must have been created for use with the specified image.

image_ID : The image.
layer_ID : The layer to receive the mask.
mask_ID : The mask to add to the layer.
Returns : TRUE on success.


gimp_image_remove_layer_mask ()

gboolean    gimp_image_remove_layer_mask    (gint32 image_ID,
                                             gint32 layer_ID,
                                             GimpMaskApplyMode mode);

Remove the specified layer mask from the layer.

This procedure removes the specified layer mask from the layer. If the mask doesn't exist, an error is returned.

image_ID : The image.
layer_ID : The layer from which to remove mask.
mode : Removal mode.
Returns : TRUE on success.


gimp_image_raise_channel ()

gboolean    gimp_image_raise_channel        (gint32 image_ID,
                                             gint32 channel_ID);

Raise the specified channel in the image's channel stack

This procedure raises the specified channel one step in the existing channel stack. It will not move the channel if there is no channel above it.

image_ID : The image.
channel_ID : The channel to raise.
Returns : TRUE on success.


gimp_image_lower_channel ()

gboolean    gimp_image_lower_channel        (gint32 image_ID,
                                             gint32 layer_ID);

Lower the specified layer in the image's layer stack

This procedure lowers the specified layer one step in the existing layer stack. It will not move the layer if there is no layer below it, or the layer has no alpha channel.

image_ID : The image.
layer_ID : The layer to lower.
Returns : TRUE on success.


gimp_image_add_channel ()

gboolean    gimp_image_add_channel          (gint32 image_ID,
                                             gint32 channel_ID,
                                             gint position);

Add the specified channel to the image.

This procedure adds the specified channel to the image. The position channel is not currently used, so the channel is always inserted at the top of the channel stack.

image_ID : The image.
channel_ID : The channel.
position : The channel position.
Returns : TRUE on success.


gimp_image_remove_channel ()

gboolean    gimp_image_remove_channel       (gint32 image_ID,
                                             gint32 channel_ID);

Remove the specified channel from the image.

This procedure removes the specified channel from the image. If the channel doesn't exist, an error is returned.

image_ID : The image.
channel_ID : The channel.
Returns : TRUE on success.


gimp_image_active_drawable ()

gint32      gimp_image_active_drawable      (gint32 image_ID);

Get the image's 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.

image_ID : The image.
Returns : The active drawable.


gimp_image_base_type ()

GimpImageBaseType gimp_image_base_type      (gint32 image_ID);

Get the base type of the image.

This procedure returns the image's base type. Layers in the image must be of this subtype, but can have an optional alpha channel.

image_ID : The image.
Returns : The image's base type.


gimp_image_undo_is_enabled ()

gboolean    gimp_image_undo_is_enabled      (gint32 image_ID);

Check if the image's undo stack is enabled.

This procedure checks if the image's undo stack is currently enabled or disabled. This is useful when several plugins or scripts call each other and want to check if their caller has already used 'gimp_image_undo_disable' or 'gimp_image_undo_freeze'.

image_ID : The image.
Returns : True if undo is enabled for this image.


gimp_image_undo_enable ()

gboolean    gimp_image_undo_enable          (gint32 image_ID);

Enable the image's undo stack.

This procedure enables the image's undo stack, allowing subsequent operations to store their undo steps. This is generally called in conjunction with 'gimp_image_undo_disable' to temporarily disable an image undo stack.

image_ID : The image.
Returns : True if the image undo has been enabled.


gimp_image_undo_disable ()

gboolean    gimp_image_undo_disable         (gint32 image_ID);

Disable the image's undo stack.

This procedure disables the image's undo stack, allowing subsequent operations to ignore their undo steps. This is generally called in conjunction with 'gimp_image_undo_enable' to temporarily disable an image undo stack. This is advantageous because saving undo steps can be time and memory intensive.

image_ID : The image.
Returns : True if the image undo has been disabled.


gimp_image_undo_freeze ()

gboolean    gimp_image_undo_freeze          (gint32 image_ID);

Freeze the image's undo stack.

This procedure freezes the image's undo stack, allowing subsequent operations to ignore their undo steps. This is generally called in conjunction with 'gimp_image_undo_thaw' to temporarily disable an image undo stack. This is advantageous because saving undo steps can be time and memory intensive. 'gimp_image_undo_{freeze,thaw}' and 'gimp_image_undo_{disable,enable}' differ in that the former does not free up all undo steps when undo is thawed, so is more suited to interactive in-situ previews. It is important in this case that the image is back to the same state it was frozen in before thawing, else 'undo' behaviour is undefined.

image_ID : The image.
Returns : True if the image undo has been frozen.


gimp_image_undo_thaw ()

gboolean    gimp_image_undo_thaw            (gint32 image_ID);

Thaw the image's undo stack.

This procedure thaws the image's undo stack, allowing subsequent operations to store their undo steps. This is generally called in conjunction with 'gimp_image_undo_freeze' to temporarily freeze an image undo stack. 'gimp_image_undo_thaw' does NOT free the undo stack as 'gimp_image_undo_enable' does, so is suited for situations where one wishes to leave the undo stack in the same state in which one found it despite non-destructively playing with the image in the meantime. An example would be in-situ plugin previews. Balancing freezes and thaws and ensuring image consistancy is the responsibility of the caller.

image_ID : The image.
Returns : True if the image undo has been thawed.


gimp_image_clean_all ()

gboolean    gimp_image_clean_all            (gint32 image_ID);

Set the image dirty count to 0.

This procedure sets the specified image's dirty count to 0, allowing operations to occur without having a 'dirtied' image. This is especially useful for creating and loading images which should not initially be considered dirty, even though layers must be created, filled, and installed in the image.

image_ID : The image.
Returns : TRUE on success.


gimp_image_floating_selection ()

gint32      gimp_image_floating_selection   (gint32 image_ID);

Return the floating selection of the image.

This procedure returns the image's floating_sel, if it exists. If it doesn't exist, -1 is returned as the layer ID.

image_ID : The image.
Returns : The image's floating selection.


gimp_image_floating_sel_attached_to ()

gint32      gimp_image_floating_sel_attached_to
                                            (gint32 image_ID);

Return the drawable the floating selection is attached to.

This procedure returns the drawable the image's floating selection is attached to, if it exists. If it doesn't exist, -1 is returned as the drawable ID.

image_ID : The image.
Returns : The drawable the floating selection is attached to.


gimp_image_set_tattoo_state ()

gboolean    gimp_image_set_tattoo_state     (gint32 image_ID,
                                             gint tattoo);

Set the tattoo state associated with the image.

This procedure sets the tattoo state of the image. Use only by save/load plugins that wish to preserve an images tattoo state. Using this function at other times will produce unexpected results. A full check of uniqueness of states in layers, channels and paths will be performed by this procedure and a execution failure will be returned if this fails. A failure will also be returned if the new tattoo state value is less than the maximum tattoo value from all of the tattoos from the paths,layers and channels. After the image data has been loaded and all the tattoos have been set then this is the last procedure that should be called. If effectively does a status check on the tattoo values that have been set to make sure that all is OK.

image_ID : The image.
tattoo : The new tattoo state of the image.
Returns : TRUE on success.


gimp_image_get_tattoo_state ()

gint        gimp_image_get_tattoo_state     (gint32 image_ID);

Returns the tattoo state associated with the image.

This procedure returns the tattoo state of the image. Use only by save/load plugins that wish to preserve an images tattoo state. Using this function at other times will produce unexpected results.

image_ID : The image.
Returns : The tattoo state associated with the image.


gimp_image_width ()

gint        gimp_image_width                (gint32 image_ID);

Return the width of the image

This procedure returns the image's width. This value is independent of any of the layers in this image. This is the \"canvas\" width.

image_ID : The image.
Returns : The image's width.


gimp_image_height ()

gint        gimp_image_height               (gint32 image_ID);

Return the height of the image

This procedure returns the image's width. This value is independent of any of the layers in this image. This is the \"canvas\" height.

image_ID : The image.
Returns : The image's height.


gimp_image_get_active_layer ()

gint32      gimp_image_get_active_layer     (gint32 image_ID);

Returns the specified image's active layer.

If there is an active layer, its ID will be returned, otherwise, -1. If a channel is currently active, then no layer will be. If a layer mask is active, then this will return the associated layer.

image_ID : The image.
Returns : The active layer.


gimp_image_set_active_layer ()

gboolean    gimp_image_set_active_layer     (gint32 image_ID,
                                             gint32 active_layer_ID);

Sets the specified image's active layer.

If the layer exists, it is set as the active layer in the image. Any previous active layer or channel is set to inactive. An exception is a previously existing floating selection, in which case this procedure will return an execution error.

image_ID : The image.
active_layer_ID : The new image active layer.
Returns : TRUE on success.


gimp_image_get_active_channel ()

gint32      gimp_image_get_active_channel   (gint32 image_ID);

Returns the specified image's active channel.

If there is an active channel, this will return the channel ID, otherwise, -1.

image_ID : The image.
Returns : The active channel.


gimp_image_set_active_channel ()

gboolean    gimp_image_set_active_channel   (gint32 image_ID,
                                             gint32 active_channel_ID);

Sets the specified image's active channel.

If the channel exists, it is set as the active channel in the image. Any previous active channel or channel is set to inactive. An exception is a previously existing floating selection, in which case this procedure will return an execution error.

image_ID : The image.
active_channel_ID : The new image active channel.
Returns : TRUE on success.


gimp_image_get_selection ()

gint32      gimp_image_get_selection        (gint32 image_ID);

Returns the specified image's selection.

This will always return a valid ID for a selection -- which is represented as a channel internally.

image_ID : The image.
Returns : The selection channel.


gimp_image_get_component_active ()

gboolean    gimp_image_get_component_active (gint32 image_ID,
                                             GimpChannelType component);

Returns if the specified image's image component is active.

This procedure returns if the specified image's image component (i.e. Red, Green, Blue intensity channels in an RGB image) is active or inactive -- whether or not it can be modified. If the specified component is not valid for the image type, an error is returned.

image_ID : The image.
component : The image component.
Returns : Component is active.


gimp_image_set_component_active ()

gboolean    gimp_image_set_component_active (gint32 image_ID,
                                             GimpChannelType component,
                                             gboolean active);

Sets if the specified image's image component is active.

This procedure sets if the specified image's image component (i.e. Red, Green, Blue intensity channels in an RGB image) is active or inactive -- whether or not it can be modified. If the specified component is not valid for the image type, an error is returned.

image_ID : The image.
component : The image component.
active : Component is active.
Returns : TRUE on success.


gimp_image_get_component_visible ()

gboolean    gimp_image_get_component_visible
                                            (gint32 image_ID,
                                             GimpChannelType component);

Returns if the specified image's image component is visible.

This procedure returns if the specified image's image component (i.e. Red, Green, Blue intensity channels in an RGB image) is visible or invisible -- whether or not it can be seen. If the specified component is not valid for the image type, an error is returned.

image_ID : The image.
component : The image component.
Returns : Component is visible.


gimp_image_set_component_visible ()

gboolean    gimp_image_set_component_visible
                                            (gint32 image_ID,
                                             GimpChannelType component,
                                             gboolean visible);

Sets if the specified image's image component is visible.

This procedure sets if the specified image's image component (i.e. Red, Green, Blue intensity channels in an RGB image) is visible or invisible -- whether or not it can be seen. If the specified component is not valid for the image type, an error is returned.

image_ID : The image.
component : The image component.
visible : Component is visible.
Returns : TRUE on success.


gimp_image_get_filename ()

gchar*      gimp_image_get_filename         (gint32 image_ID);

Returns the specified image's filename.

This procedure returns the specified image's filename -- if it was loaded or has since been saved. Otherwise, returns NULL.

image_ID : The image.
Returns : The filename.


gimp_image_set_filename ()

gboolean    gimp_image_set_filename         (gint32 image_ID,
                                             gchar *filename);

Sets the specified image's filename.

This procedure sets the specified image's filename.

image_ID : The image.
filename : The new image filename.
Returns : TRUE on success.


gimp_image_get_resolution ()

gboolean    gimp_image_get_resolution       (gint32 image_ID,
                                             gdouble *xresolution,
                                             gdouble *yresolution);

Returns the specified image's resolution.

This procedure returns the specified image's resolution in dots per inch. This value is independent of any of the layers in this image.

image_ID : The image.
xresolution : The resolutionin the x-axis, in dots per inch.
yresolution : The resolutionin the y-axis, in dots per inch.
Returns : TRUE on success.


gimp_image_set_resolution ()

gboolean    gimp_image_set_resolution       (gint32 image_ID,
                                             gdouble xresolution,
                                             gdouble yresolution);

Sets the specified image's resolution.

This procedure sets the specified image's resolution in dots per inch. This value is independent of any of the layers in this image. No scaling or resizing is performed.

image_ID : The image.
xresolution : The new image resolution in the x-axis, in dots per inch.
yresolution : The new image resolution in the y-axis, in dots per inch.
Returns : TRUE on success.


gimp_image_get_unit ()

GimpUnit    gimp_image_get_unit             (gint32 image_ID);

Returns the specified image's unit.

This procedure returns the specified image's unit. This value is independent of any of the layers in this image. See the gimp_unit_* procedure definitions for the valid range of unit IDs and a description of the unit system.

image_ID : The image.
Returns : The unit.


gimp_image_set_unit ()

gboolean    gimp_image_set_unit             (gint32 image_ID,
                                             GimpUnit unit);

Sets the specified image's unit.

This procedure sets the specified image's unit. No scaling or resizing is performed. This value is independent of any of the layers in this image. See the gimp_unit_* procedure definitions for the valid range of unit IDs and a description of the unit system.

image_ID : The image.
unit : The new image unit.
Returns : TRUE on success.


gimp_image_get_layer_by_tattoo ()

gint32      gimp_image_get_layer_by_tattoo  (gint32 image_ID,
                                             gint tattoo);

Find a layer with a given tattoo in an image.

This procedure returns the layer with the given tattoo in the specified image.

image_ID : The image.
tattoo : The tattoo of the layer to find.
Returns : The layer with the specified tattoo.


gimp_image_get_channel_by_tattoo ()

gint32      gimp_image_get_channel_by_tattoo
                                            (gint32 image_ID,
                                             gint tattoo);

Find a channel with a given tattoo in an image.

This procedure returns the channel with the given tattoo in the specified image.

image_ID : The image.
tattoo : The tattoo of the channel to find.
Returns : The channel with the specified tattoo.


gimp_image_get_cmap ()

guchar*     gimp_image_get_cmap             (gint32 image_ID,
                                             gint *num_colors);

Returns the image's colormap

This procedure returns an actual pointer to the image's colormap, as well as the number of colors contained in the colormap. If the image is not of base type INDEXED, this pointer will be NULL.

image_ID : The image.
num_colors : Number of colors in the colormap array.
Returns : The image's colormap.


gimp_image_set_cmap ()

gboolean    gimp_image_set_cmap             (gint32 image_ID,
                                             guchar *cmap,
                                             gint num_colors);

Sets the entries in the image's colormap.

This procedure sets the entries in the specified image's colormap. The number of colors is specified by the \"num_colors\" parameter and corresponds to the number of INT8 triples that must be contained in the \"cmap\" array.

image_ID : The image.
cmap : The new colormap values.
num_colors : Number of colors in the colormap array.
Returns : TRUE on success.


gimp_image_get_thumbnail_data ()

guchar*     gimp_image_get_thumbnail_data   (gint32 image_ID,
                                             gint *width,
                                             gint *height,
                                             gint *bpp);

image_ID : 
width : 
height : 
bpp : 


gimp_image_convert_rgb

#define gimp_image_convert_rgb        gimp_convert_rgb


gimp_image_convert_grayscale

#define gimp_image_convert_grayscale  gimp_convert_grayscale


gimp_image_convert_indexed

#define gimp_image_convert_indexed    gimp_convert_indexed


gimp_image_duplicate

#define gimp_image_duplicate          gimp_channel_ops_duplicate