gimpimage: GIMP Library Reference Manual

## gimpimage gimpimage |

## Functions

gint * | gimp_image_list ()
gint32 | gimp_image_new ()
gchar * | gimp_image_get_uri ()
gchar * | gimp_image_get_xcf_uri ()
gchar * | gimp_image_get_exported_uri ()
gchar * | gimp_image_get_imported_uri ()
gint32 | gimp_image_duplicate ()
gboolean | gimp_image_delete ()
gboolean | gimp_image_is_valid ()
GimpImageBaseType | gimp_image_base_type ()
gint | gimp_image_width ()
gint | gimp_image_height ()
gboolean | gimp_image_free_shadow ()
gboolean | gimp_image_flip ()
gboolean | gimp_image_rotate ()
gboolean | gimp_image_resize ()
gboolean | gimp_image_resize_to_layers ()
gboolean | gimp_image_scale ()
gboolean | gimp_image_scale_full ()
gboolean | gimp_image_crop ()
gint * | gimp_image_get_layers ()
gint * | gimp_image_get_channels ()
gint32 | gimp_image_get_active_drawable ()
gint32 | gimp_image_get_floating_sel ()
gint32 | gimp_image_floating_sel_attached_to ()
gboolean | gimp_image_pick_color ()
gint32 | gimp_image_pick_correlate_layer ()
gint | gimp_image_get_item_position ()
gboolean | gimp_image_reorder_item ()
gboolean | gimp_image_raise_item ()
gboolean | gimp_image_lower_item ()
gboolean | gimp_image_raise_item_to_top ()
gboolean | gimp_image_lower_item_to_bottom ()
gboolean | gimp_image_add_layer ()
gboolean | gimp_image_insert_layer ()
gboolean | gimp_image_remove_layer ()
gboolean | gimp_image_raise_layer ()
gboolean | gimp_image_lower_layer ()
gboolean | gimp_image_raise_layer_to_top ()
gboolean | gimp_image_lower_layer_to_bottom ()
gint | gimp_image_get_layer_position ()
gboolean | gimp_image_add_channel ()
gboolean | gimp_image_insert_channel ()
gboolean | gimp_image_remove_channel ()
gboolean | gimp_image_raise_channel ()
gboolean | gimp_image_lower_channel ()
gint | gimp_image_get_channel_position ()
gint32 | gimp_image_flatten ()
gint32 | gimp_image_merge_visible_layers ()
gint32 | gimp_image_merge_down ()
gboolean | gimp_image_clean_all ()
gboolean | gimp_image_is_dirty ()
gint32 | gimp_image_get_active_layer ()
gboolean | gimp_image_set_active_layer ()
gint32 | gimp_image_get_active_channel ()
gboolean | gimp_image_set_active_channel ()
gboolean | gimp_image_unset_active_channel ()
gint32 | gimp_image_get_selection ()
gboolean | gimp_image_get_component_active ()
gboolean | gimp_image_set_component_active ()
gboolean | gimp_image_get_component_visible ()
gboolean | gimp_image_set_component_visible ()
gchar * | gimp_image_get_filename ()
gboolean | gimp_image_set_filename ()
gchar * | gimp_image_get_name ()
gboolean | gimp_image_get_resolution ()
gboolean | gimp_image_set_resolution ()
GimpUnit | gimp_image_get_unit ()
gboolean | gimp_image_set_unit ()
gboolean | gimp_image_set_tattoo_state ()
gint | gimp_image_get_tattoo_state ()
gint32 | gimp_image_get_layer_by_tattoo ()
gint32 | gimp_image_get_channel_by_tattoo ()
gint32 | gimp_image_get_vectors_by_tattoo ()
gint32 | gimp_image_get_layer_by_name ()
gint32 | gimp_image_get_channel_by_name ()
gint32 | gimp_image_get_vectors_by_name ()
guchar * | gimp_image_get_cmap ()
gboolean | gimp_image_set_cmap ()
guchar * | gimp_image_get_colormap ()
gboolean | gimp_image_set_colormap ()
gint * | gimp_image_get_vectors ()
guchar * | gimp_image_get_thumbnail_data ()
gboolean | gimp_image_attach_parasite ()
gboolean | gimp_image_detach_parasite ()
GimpParasite * | gimp_image_get_parasite ()
gchar ** | gimp_image_get_parasite_list ()
GimpParasite * | gimp_image_parasite_find ()
gboolean | gimp_image_parasite_list ()
gboolean | gimp_image_parasite_attach ()
gboolean | gimp_image_parasite_detach ()
gboolean | gimp_image_attach_new_parasite ()
gboolean | gimp_image_add_vectors ()
gboolean | gimp_image_insert_vectors ()
gboolean | gimp_image_remove_vectors ()
gint32 | gimp_image_get_active_vectors ()
gboolean | gimp_image_set_active_vectors ()
gboolean | gimp_image_lower_vectors ()
gboolean | gimp_image_raise_vectors ()
gboolean | gimp_image_lower_vectors_to_bottom ()
gboolean | gimp_image_raise_vectors_to_top ()
gint | gimp_image_get_vectors_position ()

## Description

## Functions

### gimp_image_list ()

    gint *
    gimp_image_list (gint *num_images);

### gimp_image_new ()

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

### gimp_image_get_uri ()

    gchar *
    gimp_image_get_uri (gint32 image_ID);

Since: GIMP 2.8

### gimp_image_get_xcf_uri ()

    gchar *
    gimp_image_get_xcf_uri (gint32 image_ID);

Since: GIMP 2.8

### gimp_image_get_exported_uri ()

    gchar *
    gimp_image_get_exported_uri (gint32 image_ID);

Since: GIMP 2.8

### gimp_image_get_imported_uri ()

    gchar *
    gimp_image_get_imported_uri (gint32 image_ID);

Since: GIMP 2.8

### gimp_image_duplicate ()

    gint32
    gimp_image_duplicate (gint32 image_ID);

### gimp_image_delete ()

    gboolean
    gimp_image_delete (gint32 image_ID);

### gimp_image_is_valid ()

    gboolean
    gimp_image_is_valid (gint32 image_ID);

Since: GIMP 2.4

### gimp_image_base_type ()

    GimpImageBaseType
    gimp_image_base_type (gint32 image_ID);

### gimp_image_width ()

    gint
    gimp_image_width (gint32 image_ID);

### gimp_image_height ()

    gint
    gimp_image_height (gint32 image_ID);

### gimp_image_free_shadow ()

    gboolean
    gimp_image_free_shadow (gint32 image_ID);

`gimp_image_free_shadow` is deprecated and should not be used in newly-written code.

Use `gimp_drawable_free_shadow()` instead.

### gimp_image_flip ()

    gboolean
    gimp_image_flip (gint32 image_ID,
                     GimpOrientationType flip_type);

### gimp_image_rotate ()

    gboolean
    gimp_image_rotate (gint32 image_ID,
                       GimpRotationType rotate_type);

### gimp_image_resize ()

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

`gimp_image_resize` is deprecated and should not be used in newly-written code.

### gimp_image_resize_to_layers ()

    gboolean
    gimp_image_resize_to_layers (gint32 image_ID);

Since: GIMP 2.2

### gimp_image_scale ()

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

### gimp_image_scale_full ()

    gboolean
    gimp_image_scale_full (gint32 image_ID,
                           gint new_width,
                           gint new_height,
                           GimpInterpolationType interpolation);

`gimp_image_scale_full` is deprecated and should not be used in newly-written code.

Use `gimp_image_scale()` instead.

Since: GIMP 2.6

### gimp_image_crop ()

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

`gimp_image_crop` is deprecated and should not be used in newly-written code.

### gimp_image_get_layers ()

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

### gimp_image_get_channels ()

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

### gimp_image_get_active_drawable ()

    gint32
    gimp_image_get_active_drawable (gint32 image_ID);

### gimp_image_get_floating_sel ()

    gint32
    gimp_image_get_floating_sel (gint32 image_ID);

### gimp_image_floating_sel_attached_to ()

    gint32
    gimp_image_floating_sel_attached_to (gint32 image_ID);

### gimp_image_pick_color ()

    gboolean
    gimp_image_pick_color (gint32 image_ID,
                           gint32 drawable_ID,
                           gdouble x,
                           gdouble y,
                           gboolean sample_merged,
                           gboolean sample_average,
                           gdouble average_radius,
                           GimpRGB *color);

### gimp_image_pick_correlate_layer ()

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

### gimp_image_get_item_position ()

    gint
    gimp_image_get_item_position (gint32 image_ID,
                                  gint32 item_ID);

Since: GIMP 2.8

### gimp_image_reorder_item ()

    gboolean
    gimp_image_reorder_item (gint32 image_ID,
                             gint32 item_ID,
                             gint32 parent_ID,
                             gint position);

Since: GIMP 2.8

### gimp_image_raise_item ()

    gboolean
    gimp_image_raise_item (gint32 image_ID,
                           gint32 item_ID);

Since: GIMP 2.8

### gimp_image_lower_item ()

    gboolean
    gimp_image_lower_item (gint32 image_ID,
                           gint32 item_ID);

Since: GIMP 2.8

### gimp_image_raise_item_to_top ()

    gboolean
    gimp_image_raise_item_to_top (gint32 image_ID,
                                  gint32 item_ID);

Since: GIMP 2.8

### gimp_image_lower_item_to_bottom ()

    gboolean
    gimp_image_lower_item_to_bottom (gint32 image_ID,
                                     gint32 item_ID);

Since: GIMP 2.8

### gimp_image_add_layer ()

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

`gimp_image_add_layer` is deprecated and should not be used in newly-written code.

Use `gimp_image_insert_layer()` instead.

### gimp_image_insert_layer ()

    gboolean
    gimp_image_insert_layer (gint32 image_ID,
                             gint32 layer_ID,
                             gint32 parent_ID,
                             gint position);

`gimp_image_insert_layer` is deprecated and should not be used in newly-written code.

### gimp_image_remove_layer ()

    gboolean
    gimp_image_remove_layer (gint32 image_ID,
                             gint32 layer_ID);

### gimp_image_raise_layer ()

    gboolean
    gimp_image_raise_layer (gint32 image_ID,
                            gint32 layer_ID);

`gimp_image_raise_layer` is deprecated and should not be used in newly-written code.

Use `gimp_image_raise_item()` instead.

### gimp_image_lower_layer ()

    gboolean
    gimp_image_lower_layer (gint32 image_ID,
                            gint32 layer_ID);

`gimp_image_lower_layer` is deprecated and should not be used in newly-written code.

Use `gimp_image_lower_item()` instead.

### gimp_image_raise_layer_to_top ()

    gboolean
    gimp_image_raise_layer_to_top (gint32 image_ID,
                                   gint32 layer_ID);

`gimp_image_raise_layer_to_top` is deprecated and should not be used in newly-written code.

Use `gimp_image_raise_item_to_top()` instead.

### gimp_image_lower_layer_to_bottom ()

    gboolean
    gimp_image_lower_layer_to_bottom (gint32 image_ID,
                                      gint32 layer_ID);

`gimp_image_lower_layer_to_bottom` is deprecated and should not be used in newly-written code.

Use `gimp_image_lower_item_to_bottom()` instead.

### gimp_image_get_layer_position ()

    gint
    gimp_image_get_layer_position (gint32 image_ID,
                                   gint32 layer_ID);

`gimp_image_get_layer_position` is deprecated and should not be used in newly-written code.

Use `gimp_image_get_item_position()` instead.

Since: GIMP 2.4

### gimp_image_add_channel ()

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

`gimp_image_add_channel` is deprecated and should not be used in newly-written code.

Use `gimp_image_insert_channel()` instead.

### gimp_image_insert_channel ()

    gboolean
    gimp_image_insert_channel (gint32 image_ID,
                               gint32 channel_ID,
                               gint32 parent_ID,
                               gint position);

`gimp_image_insert_channel` is deprecated and should not be used in newly-written code.

### gimp_image_remove_channel ()

    gboolean
    gimp_image_remove_channel (gint32 image_ID,
                               gint32 channel_ID);

### gimp_image_raise_channel ()

    gboolean
    gimp_image_raise_channel (gint32 image_ID,
                              gint32 channel_ID);

`gimp_image_raise_channel` is deprecated and should not be used in newly-written code.

Use `gimp_image_raise_item()` instead.

### gimp_image_lower_channel ()

    gboolean
    gimp_image_lower_channel (gint32 image_ID,
                              gint32 channel_ID);

`gimp_image_lower_channel` is deprecated and should not be used in newly-written code.

Use `gimp_image_lower_item()` instead.

### gimp_image_get_channel_position ()

    gint
    gimp_image_get_channel_position (gint32 image_ID,
                                     gint32 channel_ID);

`gimp_image_get_channel_position` is deprecated and should not be used in newly-written code.

Use `gimp_image_get_item_position()` instead.

Since: GIMP 2.4

### gimp_image_flatten ()

    gint32
    gimp_image_flatten (gint32 image_ID);

### gimp_image_merge_visible_layers ()

    gint32
    gimp_image_merge_visible_layers (gint32 image_ID,
                                     GimpMergeType merge_type);

### gimp_image_merge_down ()

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

### gimp_image_clean_all ()

    gboolean
    gimp_image_clean_all (gint32 image_ID);

### gimp_image_is_dirty ()

    gboolean
    gimp_image_is_dirty (gint32 image_ID);

### gimp_image_get_active_layer ()

    gint32
    gimp_image_get_active_layer (gint32 image_ID);

### gimp_image_set_active_layer ()

    gboolean
    gimp_image_set_active_layer (gint32 image_ID,
                                 gint32 active_layer_ID);

### gimp_image_get_active_channel ()

    gint32
    gimp_image_get_active_channel (gint32 image_ID);

### gimp_image_set_active_channel ()

    gboolean
    gimp_image_set_active_channel (gint32 image_ID,
                                   gint32 active_channel_ID);

### gimp_image_unset_active_channel ()

    gboolean
    gimp_image_unset_active_channel (gint32 image_ID);

### gimp_image_get_selection ()

    gint32
    gimp_image_get_selection (gint32 image_ID);

### gimp_image_get_component_active ()

    gboolean
    gimp_image_get_component_active (gint32 image_ID,
                                     GimpChannelType component);

### gimp_image_set_component_active ()

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

### gimp_image_get_component_visible ()

    gboolean
    gimp_image_get_component_visible (gint32 image_ID,
                                      GimpChannelType component);

### gimp_image_set_component_visible ()

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

### gimp_image_get_filename ()

    gchar *
    gimp_image_get_filename (gint32 image_ID);

### gimp_image_set_filename ()

    gboolean
    gimp_image_set_filename (gint32 image_ID,
                             const gchar *filename);

### gimp_image_get_name ()

    gchar *
    gimp_image_get_name (gint32 image_ID);

### gimp_image_get_resolution ()

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

### gimp_image_set_resolution ()

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

### gimp_image_get_unit ()

    GimpUnit
    gimp_image_get_unit (gint32 image_ID);

### gimp_image_set_unit ()

    gboolean
    gimp_image_set_unit (gint32 image_ID,
                         GimpUnit unit);

### gimp_image_set_tattoo_state ()

    gboolean
    gimp_image_set_tattoo_state (gint32 image_ID,
                                 gint tattoo_state);

### gimp_image_get_tattoo_state ()

    gint
    gimp_image_get_tattoo_state (gint32 image_ID);

### gimp_image_get_layer_by_tattoo ()

    gint32
    gimp_image_get_layer_by_tattoo (gint32 image_ID,
                                    gint tattoo);

### gimp_image_get_channel_by_tattoo ()

    gint32
    gimp_image_get_channel_by_tattoo (gint32 image_ID,
                                      gint tattoo);

### gimp_image_get_vectors_by_tattoo ()

    gint32
    gimp_image_get_vectors_by_tattoo (gint32 image_ID,
                                      gint tattoo);

Since: GIMP 2.6

### gimp_image_get_layer_by_name ()

    gint32
    gimp_image_get_layer_by_name (gint32 image_ID,
                                  const gchar *name);

Since: GIMP 2.8

### gimp_image_get_channel_by_name ()

    gint32
    gimp_image_get_channel_by_name (gint32 image_ID,
                                    const gchar *name);

Since: GIMP 2.8

### gimp_image_get_vectors_by_name ()

    gint32
    gimp_image_get_vectors_by_name (gint32 image_ID,
                                    const gchar *name);

Since: GIMP 2.8

### gimp_image_get_cmap ()

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

`gimp_image_get_cmap` is deprecated and should not be used in newly-written code.

### gimp_image_set_cmap ()

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

`gimp_image_set_cmap` is deprecated and should not be used in newly-written code.

### gimp_image_get_colormap ()

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

### gimp_image_set_colormap ()

    gboolean
    gimp_image_set_colormap (gint32 image_ID,
                             const guchar *colormap,
                             gint num_colors);

### gimp_image_get_vectors ()

    gint *
    gimp_image_get_vectors (gint32 image_ID,
                            gint *num_vectors);

Since: GIMP 2.4

### gimp_image_get_thumbnail_data ()

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

### gimp_image_attach_parasite ()

    gboolean
    gimp_image_attach_parasite (gint32 image_ID,
                                const GimpParasite *parasite);

Since: GIMP 2.8

### gimp_image_detach_parasite ()

    gboolean
    gimp_image_detach_parasite (gint32 image_ID,
                                const gchar *name);

Since: GIMP 2.8

### gimp_image_get_parasite ()

    GimpParasite *
    gimp_image_get_parasite (gint32 image_ID,
                             const gchar *name);

Since: GIMP 2.8

### gimp_image_get_parasite_list ()

    gchar **
    gimp_image_get_parasite_list (gint32 image_ID,
                                  gint *num_parasites);

Since: GIMP 2.8

### gimp_image_parasite_find ()

    GimpParasite *
    gimp_image_parasite_find (gint32 image_ID,
                              const gchar *name);

`gimp_image_parasite_find` is deprecated and should not be used in newly-written code.

Use `gimp_image_get_parasite()` instead.

### gimp_image_parasite_list ()

    gboolean
    gimp_image_parasite_list (gint32 image_ID,
                              gint *num_parasites,
                              gchar ***parasites);

`gimp_image_parasite_list` is deprecated and should not be used in newly-written code.

Use `gimp_image_get_parasite_list()` instead.

### gimp_image_parasite_attach ()

    gboolean
    gimp_image_parasite_attach (gint32 image_ID,
                                const GimpParasite *parasite);

`gimp_image_parasite_attach` is deprecated and should not be used in newly-written code.

Use `gimp_image_attach_parasite()` instead.

### gimp_image_parasite_detach ()

    gboolean
    gimp_image_parasite_detach (gint32 image_ID,
                                const gchar *name);

`gimp_image_parasite_detach` is deprecated and should not be used in newly-written code.

Use `gimp_image_detach_parasite()` instead.

### gimp_image_attach_new_parasite ()

    gboolean
    gimp_image_attach_new_parasite (gint32 image_ID,
                                    const gchar *name,
                                    gint flags,
                                    gint size,
                                    gconstpointer data);

`gimp_image_attach_new_parasite` is deprecated and should not be used in newly-written code.

Use `gimp_image_attach_parasite()` instead.

### gimp_image_add_vectors ()

    gboolean
    gimp_image_add_vectors (gint32 image_ID,
                            gint32 vectors_ID,
                            gint position);

`gimp_image_add_vectors` is deprecated and should not be used in newly-written code.

Use `gimp_image_insert_vectors()` instead.

### gimp_image_insert_vectors ()

    gboolean
    gimp_image_insert_vectors (gint32 image_ID,
                               gint32 vectors_ID,
                               gint32 parent_ID,
                               gint position);

`gimp_image_insert_vectors` is deprecated and should not be used in newly-written code.

### gimp_image_remove_vectors ()

    gboolean
    gimp_image_remove_vectors (gint32 image_ID,
                               gint32 vectors_ID);

Since: GIMP 2.4

### gimp_image_get_active_vectors ()

    gint32
    gimp_image_get_active_vectors (gint32 image_ID);

### gimp_image_set_active_vectors ()

    gboolean
    gimp_image_set_active_vectors (gint32 image_ID,
                                   gint32 active_vectors_ID);

### gimp_image_lower_vectors ()

    gboolean
    gimp_image_lower_vectors (gint32 image_ID,
                              gint32 vectors_ID);

`gimp_image_lower_vectors` is deprecated and should not be used in newly-written code.

Use `gimp_image_lower_item()` instead.

Since: GIMP 2.4

### gimp_image_raise_vectors ()

    gboolean
    gimp_image_raise_vectors (gint32 image_ID,
                              gint32 vectors_ID);

`gimp_image_raise_vectors` is deprecated and should not be used in newly-written code.

Use `gimp_image_raise_item()` instead.

Since: GIMP 2.4

### gimp_image_lower_vectors_to_bottom ()

    gboolean
    gimp_image_lower_vectors_to_bottom (gint32 image_ID,
                                        gint32 vectors_ID);

`gimp_image_lower_vectors_to_bottom` is deprecated and should not be used in newly-written code.

Use `gimp_image_lower_item_to_bottom()` instead.

Since: GIMP 2.4

### gimp_image_raise_vectors_to_top ()

    gboolean
    gimp_image_raise_vectors_to_top (gint32 image_ID,
                                     gint32 vectors_ID);

`gimp_image_raise_vectors_to_top` is deprecated and should not be used in newly-written code.

Use `gimp_image_raise_item_to_top()` instead.

Since: GIMP 2.4

### gimp_image_get_vectors_position ()

    gint
    gimp_image_get_vectors_position (gint32 image_ID,
                                     gint32 vectors_ID);

`gimp_image_get_vectors_position` is deprecated and should not be used in newly-written code.

Use `gimp_image_get_item_position()` instead.

Since: GIMP 2.4

## Types and Values