Top | ![]() |
![]() |
![]() |
![]() |
Operations on complete images: creation, resizing/rescaling, and operations involving multiple layers.
GimpImage **
gimp_get_images (gint *num_images
);
Returns the list of images currently open.
This procedure returns the list of images currently open in GIMP.
The list of images currently open.
The returned value must be freed with g_free()
.
[array length=num_images][element-type GimpImage][transfer container]
GList *
gimp_list_images (void
);
Returns the list of images currently open.
This procedure returns the list of images currently open in GIMP.
The list of images currently open.
The returned list must be freed with g_list_free()
. Image
elements belong to libgimp and must not be freed.
[element-type GimpImage][transfer container]
Since: 3.0
GimpImage *
gimp_image_get_by_id (gint32 image_id
);
a GimpImage for image_id
or
NULL
if image_id
does not represent a valid image.
The object belongs to libgimp and you must not modify
or unref it.
[nullable][transfer none]
Since: 3.0
GimpImage * 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_insert_layer()
command.
If your image's type if INDEXED, a colormap must also be added with
gimp_image_set_colormap()
. An indexed image without a colormap will
output unexpected colors.
GimpImage * gimp_image_new_with_precision (gint width
,gint height
,GimpImageBaseType type
,GimpPrecision precision
);
Creates a new image with the specified width, height, type and precision.
Creates a new image, undisplayed with the specified extents, type
and precision. Indexed images can only be created at
GIMP_PRECISION_U8_NON_LINEAR precision. See gimp_image_new()
for
further details.
width |
The width of the image. |
|
height |
The height of the image. |
|
type |
The type of image. |
|
precision |
The precision. |
Since: 2.10
gboolean gimp_image_set_file (GimpImage *image
,GFile *file
);
Sets the specified image's file.
This procedure sets the specified image's file.
GFile *
gimp_image_get_file (GimpImage *image
);
Returns the file for the specified image.
This procedure returns the file associated with the specified image.
The image has a file only if it was loaded or imported from a file
or has since been saved or exported. Otherwise, this function
returns NULL
. See also gimp-image-get-imported-file to get the
current file if it was imported from a non-GIMP file format and not
yet saved, or gimp-image-get-exported-file if the image has been
exported to a non-GIMP file format.
Since: 2.8
GFile *
gimp_image_get_xcf_file (GimpImage *image
);
Returns the XCF file for the specified image.
This procedure returns the XCF file associated with the image. If
there is no such file, this procedure returns NULL
.
Since: 2.8
GFile *
gimp_image_get_exported_file (GimpImage *image
);
Returns the exported file for the specified image.
This procedure returns the file associated with the specified image
if the image was exported a non-native GIMP format. If the image was
not exported, this procedure returns NULL
.
Since: 2.8
GFile *
gimp_image_get_imported_file (GimpImage *image
);
Returns the imported file for the specified image.
This procedure returns the file associated with the specified image
if the image was imported from a non-native Gimp format. If the
image was not imported, or has since been saved in the native Gimp
format, this procedure returns NULL
.
Since: 2.8
GimpImage *
gimp_image_duplicate (GimpImage *image
);
Duplicate the specified image
This procedure duplicates the specified image, copying all layers, channels, and image information.
gboolean
gimp_image_delete (GimpImage *image
);
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.
gboolean
gimp_image_is_valid (GimpImage *image
);
Returns TRUE if the image is valid.
This procedure checks if the given image is valid and refers to an existing image.
Since: 2.4
gboolean
gimp_image_id_is_valid (gint image_id
);
Returns TRUE if the image ID is valid.
This procedure checks if the given image ID is valid and refers to an existing image.
Since: 3.0
GimpPrecision
gimp_image_get_precision (GimpImage *image
);
Get the precision of the image.
This procedure returns the image's precision.
Since: 2.10
GimpLayerMode
gimp_image_get_default_new_layer_mode (GimpImage *image
);
Get the default mode for newly created layers of this image.
Returns the default mode for newly created layers of this image.
Since: 2.10
GimpLayer ** gimp_image_get_layers (GimpImage *image
,gint *num_layers
);
Returns the list of root layers contained in the specified image.
This procedure returns the list of root layers contained in the
specified image. The order of layers is from topmost to bottommost.
Note that this is not the full list of layers, but only the root
layers, i.e. layers with no parents themselves. If you need all
layers, it is up to you to verify that any of these layers is a
group layer with gimp_item_is_group()
and to obtain its children
with gimp_item_get_children()
(possibly recursively checking if
these have children too).
The list of layers contained in the image.
The returned value must be freed with g_free()
.
[array length=num_layers][element-type GimpLayer][transfer container]
GList *
gimp_image_list_layers (GimpImage *image
);
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.
The list of layers contained in the image.
The returned list must be freed with g_list_free()
. Layer
elements belong to libgimp and must not be freed.
[element-type GimpLayer][transfer container]
Since: 3.0
GimpChannel ** gimp_image_get_channels (GimpImage *image
,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. Note that \"channels\" are custom channels and do not include the image's color components.
The list of channels contained in the image.
The returned value must be freed with g_free()
.
[array length=num_channels][element-type GimpChannel][transfer container]
GList *
gimp_image_list_channels (GimpImage *image
);
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. Note that "channels" are custom channels and do not include the image's color components.
The list of channels contained in the image.
The returned list must be freed with g_list_free()
. Channel
elements belong to libgimp and must not be freed.
[element-type GimpChannel][transfer container]
Since: 3.0
GimpDrawable *
gimp_image_get_active_drawable (GimpImage *image
);
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.
GimpLayer *
gimp_image_get_floating_sel (GimpImage *image
);
Return the floating selection of the image.
This procedure returns the image's floating selection, if it exists. If it doesn't exist, -1 is returned as the layer ID.
GimpDrawable *
gimp_image_floating_sel_attached_to (GimpImage *image
);
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.
gboolean gimp_image_pick_color (GimpImage *image
,gint num_drawables
,const GimpItem **drawables
,gdouble x
,gdouble y
,gboolean sample_merged
,gboolean sample_average
,gdouble average_radius
,GimpRGB *color
);
Determine the color at the given coordinates
This tool determines the color at the specified coordinates. The returned color is an RGB triplet even for grayscale and indexed drawables. If the coordinates lie outside of the extents of the specified drawables, then an error is returned. All drawables must belong to the image and be of the same type. If only one drawable is given and it has an alpha channel, the algorithm examines the alpha value of the drawable at the coordinates. If the alpha value is completely transparent (0), then an error is returned. With several drawables specified, the composite image with only these drawables is used. If the sample_merged parameter is TRUE, the data of the composite image will be used instead of that for the specified drawables. This is equivalent to sampling for colors after merging all visible layers. In the case of a merged sampling, the supplied drawables are ignored.
image |
The image. |
|
num_drawables |
The number of drawables. |
|
drawables |
The drawables to pick from. |
[array length=num_drawables][element-type GimpItem] |
x |
x coordinate of upper-left corner of rectangle. |
|
y |
y coordinate of upper-left corner of rectangle. |
|
sample_merged |
Use the composite image, not the drawables. |
|
sample_average |
Average the color of all the pixels in a specified radius. |
|
average_radius |
The radius of pixels to average. |
|
color |
The return color. |
[out caller-allocates] |
GimpLayer * gimp_image_pick_correlate_layer (GimpImage *image
,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.
gint gimp_image_get_item_position (GimpImage *image
,GimpItem *item
);
Returns the position of the item in its level of its item tree.
This procedure determines the position of the specified item in its level in its item tree in the image. If the item doesn't exist in the image, or the item is not part of an item tree, an error is returned.
Since: 2.8
gboolean gimp_image_reorder_item (GimpImage *image
,GimpItem *item
,GimpItem *parent
,gint position
);
Reorder the specified item within its item tree
This procedure reorders the specified item within its item tree.
image |
The image. |
|
item |
The item to reorder. |
|
parent |
The new parent item. |
[nullable] |
position |
The new position of the item. |
Since: 2.8
gboolean gimp_image_raise_item (GimpImage *image
,GimpItem *item
);
Raise the specified item in its level in its item tree
This procedure raises the specified item one step in the item tree. The procedure call will fail if there is no item above it.
Since: 2.8
gboolean gimp_image_lower_item (GimpImage *image
,GimpItem *item
);
Lower the specified item in its level in its item tree
This procedure lowers the specified item one step in the item tree. The procedure call will fail if there is no item below it.
Since: 2.8
gboolean gimp_image_raise_item_to_top (GimpImage *image
,GimpItem *item
);
Raise the specified item to the top of its level in its item tree
This procedure raises the specified item to top of its level in the item tree. It will not move the item if there is no item above it.
Since: 2.8
gboolean gimp_image_lower_item_to_bottom (GimpImage *image
,GimpItem *item
);
Lower the specified item to the bottom of its level in its item tree
This procedure lowers the specified item to bottom of its level in the item tree. It will not move the layer if there is no layer below it.
Since: 2.8
gboolean gimp_image_insert_layer (GimpImage *image
,GimpLayer *layer
,GimpLayer *parent
,gint position
);
Add the specified layer to the image.
This procedure adds the specified layer to the image at the given
position. If the specified parent is a valid layer group (See
gimp_item_is_group()
and gimp_layer_group_new()
) then the layer is
added inside the group. If the parent is 0, the layer is added
inside the main stack, outside of any group. The position argument
specifies the location of the layer inside the stack (or the group,
if a valid parent was supplied), starting from the top (0) and
increasing. If the position is specified as -1 and the parent is
specified as 0, then the layer is inserted above the active layer,
or inside the group if the active layer is a layer group. The layer
type must be compatible with the image base type.
gboolean gimp_image_remove_layer (GimpImage *image
,GimpLayer *layer
);
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.
gboolean
gimp_image_freeze_layers (GimpImage *image
);
Freeze the image's layer list.
This procedure freezes the layer list of the image, suppressing any updates to the Layers dialog in response to changes to the image's layers. This can significantly improve performance while applying changes affecting the layer list.
Each call to gimp_image_freeze_layers()
should be matched by a
corresponding call to gimp_image_thaw_layers()
, undoing its effects.
Since: 2.10.2
gboolean
gimp_image_thaw_layers (GimpImage *image
);
Thaw the image's layer list.
This procedure thaws the layer list of the image, re-enabling updates to the Layers dialog.
This procedure should match a corresponding call to
gimp_image_freeze_layers()
.
Since: 2.10.2
gboolean gimp_image_insert_channel (GimpImage *image
,GimpChannel *channel
,GimpChannel *parent
,gint position
);
Add the specified channel to the image.
This procedure adds the specified channel to the image at the given position. Since channel groups are not currently supported, the parent argument must always be 0. The position argument specifies the location of the channel inside the stack, starting from the top (0) and increasing. If the position is specified as -1, then the channel is inserted above the active channel.
gboolean gimp_image_remove_channel (GimpImage *image
,GimpChannel *channel
);
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.
gboolean
gimp_image_freeze_channels (GimpImage *image
);
Freeze the image's channel list.
This procedure freezes the channel list of the image, suppressing any updates to the Channels dialog in response to changes to the image's channels. This can significantly improve performance while applying changes affecting the channel list.
Each call to gimp_image_freeze_channels()
should be matched by a
corresponding call to gimp_image_thaw_channels()
, undoing its
effects.
Since: 2.10.2
gboolean
gimp_image_thaw_channels (GimpImage *image
);
Thaw the image's channel list.
This procedure thaws the channel list of the image, re-enabling updates to the Channels dialog.
This procedure should match a corresponding call to
gimp_image_freeze_channels()
.
Since: 2.10.2
GimpLayer *
gimp_image_flatten (GimpImage *image
);
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.
GimpLayer * gimp_image_merge_visible_layers (GimpImage *image
,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.
GimpLayer * gimp_image_merge_down (GimpImage *image
,GimpLayer *merge_layer
,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.
GimpLayer * gimp_image_merge_layer_group (GimpImage *image
,GimpLayer *layer_group
);
Merge the passed layer group's layers into one normal layer.
This procedure combines the layers of the passed layer group into a single normal layer, replacing the group.
Since: 2.10.14
gboolean
gimp_image_clean_all (GimpImage *image
);
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. Note that save plug-ins must NOT call this function themselves after saving the image.
gboolean
gimp_image_is_dirty (GimpImage *image
);
Checks if the image has unsaved changes.
This procedure checks the specified image's dirty count to see if it
needs to be saved. Note that saving the image does not automatically
set the dirty count to 0, you need to call gimp_image_clean_all()
after calling a save procedure to make the image clean.
GimpLayer *
gimp_image_get_active_layer (GimpImage *image
);
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.
gboolean gimp_image_set_active_layer (GimpImage *image
,GimpLayer *active_layer
);
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.
GimpChannel *
gimp_image_get_active_channel (GimpImage *image
);
Returns the specified image's active channel.
If there is an active channel, this will return the channel ID, otherwise, -1.
gboolean gimp_image_set_active_channel (GimpImage *image
,GimpChannel *active_channel
);
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 layer is set to inactive. An exception is a previously existing floating selection, in which case this procedure will return an execution error.
gboolean
gimp_image_unset_active_channel (GimpImage *image
);
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.
GimpSelection *
gimp_image_get_selection (GimpImage *image
);
Returns the specified image's selection.
This will always return a valid ID for a selection -- which is represented as a channel internally.
gboolean gimp_image_get_component_active (GimpImage *image
,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.
gboolean gimp_image_set_component_active (GimpImage *image
,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.
gboolean gimp_image_get_component_visible (GimpImage *image
,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.
gboolean gimp_image_set_component_visible (GimpImage *image
,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.
gchar *
gimp_image_get_name (GimpImage *image
);
Returns the specified image's name.
This procedure returns the image's name. If the image has a filename or an URI, then the returned name contains the filename's or URI's base name (the last component of the path). Otherwise it is the translated string \"Untitled\". The returned name is formatted like the image name in the image window title, it may contain '[]', '(imported)' etc. and should only be used to label user interface elements. Never use it to construct filenames.
gboolean gimp_image_get_resolution (GimpImage *image
,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.
gboolean gimp_image_set_resolution (GimpImage *image
,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.
GimpUnit
gimp_image_get_unit (GimpImage *image
);
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.
gboolean gimp_image_set_unit (GimpImage *image
,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.
gboolean gimp_image_set_tattoo_state (GimpImage *image
,guint tattoo_state
);
Set the tattoo state associated with the image.
This procedure sets the tattoo state of the image. Use only by save/load plug-ins 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.
guint
gimp_image_get_tattoo_state (GimpImage *image
);
Returns the tattoo state associated with the image.
This procedure returns the tattoo state of the image. Use only by save/load plug-ins that wish to preserve an images tattoo state. Using this function at other times will produce unexpected results.
GimpLayer * gimp_image_get_layer_by_tattoo (GimpImage *image
,guint tattoo
);
Find a layer with a given tattoo in an image.
This procedure returns the layer with the given tattoo in the specified image.
GimpChannel * gimp_image_get_channel_by_tattoo (GimpImage *image
,guint tattoo
);
Find a channel with a given tattoo in an image.
This procedure returns the channel with the given tattoo in the specified image.
GimpVectors * gimp_image_get_vectors_by_tattoo (GimpImage *image
,guint tattoo
);
Find a vectors with a given tattoo in an image.
This procedure returns the vectors with the given tattoo in the specified image.
Since: 2.6
GimpLayer * gimp_image_get_layer_by_name (GimpImage *image
,const gchar *name
);
Find a layer with a given name in an image.
This procedure returns the layer with the given name in the specified image.
Since: 2.8
GimpChannel * gimp_image_get_channel_by_name (GimpImage *image
,const gchar *name
);
Find a channel with a given name in an image.
This procedure returns the channel with the given name in the specified image.
Since: 2.8
GimpVectors * gimp_image_get_vectors_by_name (GimpImage *image
,const gchar *name
);
Find a vectors with a given name in an image.
This procedure returns the vectors with the given name in the specified image.
Since: 2.8
guchar * gimp_image_get_colormap (GimpImage *image
,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.
gboolean gimp_image_set_colormap (GimpImage *image
,const guchar *colormap
,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.
GimpVectors ** gimp_image_get_vectors (GimpImage *image
,gint *num_vectors
);
Returns the list of vectors contained in the specified image.
This procedure returns the list of vectors contained in the specified image.
The list of vectors contained in the image.
The returned value must be freed with g_free()
.
[array length=num_vectors][element-type GimpVectors][transfer container]
Since: 2.4
GList *
gimp_image_list_vectors (GimpImage *image
);
Returns the list of vectors contained in the specified image.
This procedure returns the list of vectors contained in the specified image.
The list of vectors contained in the image.
The returned value must be freed with g_list_free()
. Vectors
elements belong to libgimp and must not be freed.
[element-type GimpVectors][transfer container]
Since: 3.0
guchar * gimp_image_get_thumbnail_data (GimpImage *image
,gint *width
,gint *height
,gint *bpp
);
Get a thumbnail of an image.
This function gets data from which a thumbnail of an image preview can be created. Maximum x or y dimension is 1024 pixels. The pixels are returned in RGB[A] or GRAY[A] format. The bpp return value gives the number of bytes per pixel in the image.
GdkPixbuf * gimp_image_get_thumbnail (GimpImage *image
,gint width
,gint height
,GimpPixbufTransparency alpha
);
Retrieves a thumbnail pixbuf for image
.
The thumbnail will be not larger than the requested size.
image |
the GimpImage |
|
width |
the requested thumbnail width (<= 1024 pixels) |
|
height |
the requested thumbnail height (<= 1024 pixels) |
|
alpha |
how to handle an alpha channel |
Since: 2.2
GimpMetadata *
gimp_image_get_metadata (GimpImage *image
);
Returns the image's metadata.
Returns exif/iptc/xmp metadata from the image.
Since: 2.10
gboolean gimp_image_set_metadata (GimpImage *image
,GimpMetadata *metadata
);
Set the image's metadata.
Sets exif/iptc/xmp metadata on the image, or deletes it if
metadata
is NULL
.
Since: 2.10
gboolean gimp_image_attach_parasite (GimpImage *image
,const GimpParasite *parasite
);
Add a parasite to an image.
This procedure attaches a parasite to an image. It has no return values.
Since: 2.8
gboolean gimp_image_detach_parasite (GimpImage *image
,const gchar *name
);
Removes a parasite from an image.
This procedure detaches a parasite from an image. It has no return values.
Since: 2.8
GimpParasite * gimp_image_get_parasite (GimpImage *image
,const gchar *name
);
Look up a parasite in an image
Finds and returns the parasite that was previously attached to an image.
Since: 2.8
gchar ** gimp_image_get_parasite_list (GimpImage *image
,gint *num_parasites
);
List all parasites.
Returns a list of the names of all currently attached parasites.
These names can later be used to get the actual GimpParasite with
gimp_image_get_parasite()
when needed.
The names of currently attached parasites.
The returned value must be freed with g_strfreev()
.
[array length=num_parasites][element-type gchar*][transfer full]
Since: 2.8
gboolean gimp_image_insert_vectors (GimpImage *image
,GimpVectors *vectors
,GimpVectors *parent
,gint position
);
Add the specified vectors to the image.
This procedure adds the specified vectors to the image at the given position. Since vectors groups are not currently supported, the parent argument must always be 0. The position argument specifies the location of the vectors inside the stack, starting from the top (0) and increasing. If the position is specified as -1, then the vectors is inserted above the active vectors.
gboolean gimp_image_remove_vectors (GimpImage *image
,GimpVectors *vectors
);
Remove the specified path from the image.
This procedure removes the specified path from the image. If the path doesn't exist, an error is returned.
Since: 2.4
gboolean
gimp_image_freeze_vectors (GimpImage *image
);
Freeze the image's vectors list.
This procedure freezes the vectors list of the image, suppressing any updates to the Paths dialog in response to changes to the image's vectors. This can significantly improve performance while applying changes affecting the vectors list.
Each call to gimp_image_freeze_vectors()
should be matched by a
corresponding call to gimp_image_thaw_vectors()
, undoing its
effects.
Since: 2.10.2
gboolean
gimp_image_thaw_vectors (GimpImage *image
);
Thaw the image's vectors list.
This procedure thaws the vectors list of the image, re-enabling updates to the Paths dialog.
This procedure should match a corresponding call to
gimp_image_freeze_vectors()
.
Since: 2.10.2
GimpVectors *
gimp_image_get_active_vectors (GimpImage *image
);
Returns the specified image's active vectors.
If there is an active path, its ID will be returned, otherwise, -1.
gboolean gimp_image_set_active_vectors (GimpImage *image
,GimpVectors *active_vectors
);
Sets the specified image's active vectors.
If the path exists, it is set as the active path in the image.