GimpImage

GimpImage

Synopsis

#define             GIMP_IMAGE_TYPE_IS_RGB              (t)
#define             GIMP_IMAGE_TYPE_IS_GRAY             (t)
#define             GIMP_IMAGE_TYPE_IS_INDEXED          (t)
#define             GIMP_IMAGE_TYPE_HAS_ALPHA           (t)
#define             GIMP_IMAGE_TYPE_WITH_ALPHA          (t)
#define             GIMP_IMAGE_TYPE_WITHOUT_ALPHA       (t)
#define             GIMP_IMAGE_TYPE_BYTES               (t)
#define             GIMP_IMAGE_TYPE_BASE_TYPE           (t)
#define             GIMP_IMAGE_TYPE_FROM_BASE_TYPE      (b)
#define             GIMP_IMAGE_ACTIVE_PARENT
struct              GimpImageFlushAccumulator;
#define             GIMP_IMAGE_GET_PRIVATE              (image)
                    GimpImage;
struct              GimpImagePrivate;
GimpImage *         gimp_image_new                      (Gimp *gimp,
                                                         gint width,
                                                         gint height,
                                                         GimpImageBaseType base_type);
GimpImageBaseType   gimp_image_base_type                (const GimpImage *image);
GimpImageType       gimp_image_base_type_with_alpha     (const GimpImage *image);
CombinationMode     gimp_image_get_combination_mode     (GimpImageType dest_type,
                                                         gint src_bytes);
gint                gimp_image_get_ID                   (const GimpImage *image);
GimpImage *         gimp_image_get_by_ID                (Gimp *gimp,
                                                         gint id);
void                gimp_image_set_uri                  (GimpImage *image,
                                                         const gchar *uri);
const gchar *       gimp_image_get_uri                  (const GimpImage *image);
const gchar *       gimp_image_get_uri_or_untitled      (const GimpImage *image);
const gchar *       gimp_image_get_any_uri              (const GimpImage *image);
void                gimp_image_set_imported_uri         (GimpImage *image,
                                                         const gchar *uri);
const gchar *       gimp_image_get_imported_uri         (const GimpImage *image);
void                gimp_image_set_exported_uri         (GimpImage *image,
                                                         const gchar *uri);
const gchar *       gimp_image_get_exported_uri         (const GimpImage *image);
void                gimp_image_set_save_a_copy_uri      (GimpImage *image,
                                                         const gchar *uri);
const gchar *       gimp_image_get_save_a_copy_uri      (const GimpImage *image);
void                gimp_image_set_filename             (GimpImage *image,
                                                         const gchar *filename);
gchar *             gimp_image_get_filename             (const GimpImage *image);
const gchar *       gimp_image_get_display_name         (GimpImage *image);
GimpPlugInProcedure * gimp_image_get_load_proc          (const GimpImage *image);
void                gimp_image_set_load_proc            (GimpImage *image,
                                                         GimpPlugInProcedure *proc);
void                gimp_image_set_save_proc            (GimpImage *image,
                                                         GimpPlugInProcedure *proc);
GimpPlugInProcedure * gimp_image_get_save_proc          (const GimpImage *image);
void                gimp_image_saved                    (GimpImage *image,
                                                         const gchar *uri);
void                gimp_image_exported                 (GimpImage *image,
                                                         const gchar *uri);
void                gimp_image_set_resolution           (GimpImage *image,
                                                         gdouble xres,
                                                         gdouble yres);
void                gimp_image_get_resolution           (const GimpImage *image,
                                                         gdouble *xres,
                                                         gdouble *yres);
void                gimp_image_resolution_changed       (GimpImage *image);
void                gimp_image_set_unit                 (GimpImage *image,
                                                         GimpUnit unit);
GimpUnit            gimp_image_get_unit                 (const GimpImage *image);
void                gimp_image_unit_changed             (GimpImage *image);
gint                gimp_image_get_width                (const GimpImage *image);
gint                gimp_image_get_height               (const GimpImage *image);
gboolean            gimp_image_has_alpha                (const GimpImage *image);
gboolean            gimp_image_is_empty                 (const GimpImage *image);
GimpLayer *         gimp_image_get_floating_selection   (const GimpImage *image);
void                gimp_image_set_floating_selection   (GimpImage *image,
                                                         GimpLayer *floating_sel);
void                gimp_image_floating_selection_changed
                                                        (GimpImage *image);
GimpChannel *       gimp_image_get_mask                 (const GimpImage *image);
void                gimp_image_mask_changed             (GimpImage *image);
gint                gimp_image_get_component_index      (const GimpImage *image,
                                                         GimpChannelType channel);
void                gimp_image_set_component_active     (GimpImage *image,
                                                         GimpChannelType type,
                                                         gboolean active);
gboolean            gimp_image_get_component_active     (const GimpImage *image,
                                                         GimpChannelType type);
void                gimp_image_get_active_array         (const GimpImage *image,
                                                         gboolean *components);
void                gimp_image_set_component_visible    (GimpImage *image,
                                                         GimpChannelType type,
                                                         gboolean visible);
gboolean            gimp_image_get_component_visible    (const GimpImage *image,
                                                         GimpChannelType type);
void                gimp_image_get_visible_array        (const GimpImage *image,
                                                         gboolean *components);
void                gimp_image_mode_changed             (GimpImage *image);
void                gimp_image_alpha_changed            (GimpImage *image);
void                gimp_image_invalidate               (GimpImage *image,
                                                         gint x,
                                                         gint y,
                                                         gint width,
                                                         gint height);
void                gimp_image_guide_added              (GimpImage *image,
                                                         GimpGuide *guide);
void                gimp_image_guide_removed            (GimpImage *image,
                                                         GimpGuide *guide);
void                gimp_image_guide_moved              (GimpImage *image,
                                                         GimpGuide *guide);
void                gimp_image_sample_point_added       (GimpImage *image,
                                                         GimpSamplePoint *sample_point);
void                gimp_image_sample_point_removed     (GimpImage *image,
                                                         GimpSamplePoint *sample_point);
void                gimp_image_sample_point_moved       (GimpImage *image,
                                                         GimpSamplePoint *sample_point);
void                gimp_image_colormap_changed         (GimpImage *image,
                                                         gint col);
void                gimp_image_selection_invalidate     (GimpImage *image);
void                gimp_image_quick_mask_changed       (GimpImage *image);
void                gimp_image_size_changed_detailed    (GimpImage *image,
                                                         gint previous_origin_x,
                                                         gint previous_origin_y,
                                                         gint previous_width,
                                                         gint previous_height);
void                gimp_image_undo_event               (GimpImage *image,
                                                         GimpUndoEvent event,
                                                         GimpUndo *undo);
gint                gimp_image_dirty                    (GimpImage *image,
                                                         GimpDirtyMask dirty_mask);
gint                gimp_image_clean                    (GimpImage *image,
                                                         GimpDirtyMask dirty_mask);
void                gimp_image_clean_all                (GimpImage *image);
gint                gimp_image_is_dirty                 (const GimpImage *image);
gboolean            gimp_image_is_export_dirty          (const GimpImage *image);
void                gimp_image_export_clean_all         (GimpImage *image);
gint                gimp_image_get_dirty_time           (const GimpImage *image);
void                gimp_image_flush                    (GimpImage *image);
gint                gimp_image_get_display_count        (const GimpImage *image);
void                gimp_image_inc_display_count        (GimpImage *image);
void                gimp_image_dec_display_count        (GimpImage *image);
gint                gimp_image_get_instance_count       (const GimpImage *image);
void                gimp_image_inc_instance_count       (GimpImage *image);
GimpProjection *    gimp_image_get_projection           (const GimpImage *image);
void                gimp_image_get_foreground           (const GimpImage *image,
                                                         GimpContext *context,
                                                         GimpImageType dest_type,
                                                         guchar *fg);
void                gimp_image_get_background           (const GimpImage *image,
                                                         GimpContext *context,
                                                         GimpImageType dest_type,
                                                         guchar *bg);
void                gimp_image_get_color                (const GimpImage *src_image,
                                                         GimpImageType src_type,
                                                         const guchar *src,
                                                         guchar *rgba);
void                gimp_image_transform_color          (const GimpImage *dest_image,
                                                         GimpImageType dest_type,
                                                         guchar *dest,
                                                         GimpImageBaseType src_type,
                                                         const guchar *src);
void                gimp_image_transform_rgb            (const GimpImage *dest_image,
                                                         GimpImageType dest_type,
                                                         const GimpRGB *rgb,
                                                         guchar *color);
TempBuf *           gimp_image_transform_temp_buf       (const GimpImage *dest_image,
                                                         GimpImageType dest_type,
                                                         TempBuf *temp_buf,
                                                         gboolean *new_buf);
const GimpParasite * gimp_image_parasite_find           (const GimpImage *image,
                                                         const gchar *name);
gchar **            gimp_image_parasite_list            (const GimpImage *image,
                                                         gint *count);
void                gimp_image_parasite_attach          (GimpImage *image,
                                                         const GimpParasite *parasite);
void                gimp_image_parasite_detach          (GimpImage *image,
                                                         const gchar *name);
GimpTattoo          gimp_image_get_new_tattoo           (GimpImage *image);
gboolean            gimp_image_set_tattoo_state         (GimpImage *image,
                                                         GimpTattoo val);
GimpTattoo          gimp_image_get_tattoo_state         (GimpImage *image);
GimpItemTree *      gimp_image_get_layer_tree           (const GimpImage *image);
GimpItemTree *      gimp_image_get_channel_tree         (const GimpImage *image);
GimpItemTree *      gimp_image_get_vectors_tree         (const GimpImage *image);
GimpContainer *     gimp_image_get_layers               (const GimpImage *image);
GimpContainer *     gimp_image_get_channels             (const GimpImage *image);
GimpContainer *     gimp_image_get_vectors              (const GimpImage *image);
gint                gimp_image_get_n_layers             (const GimpImage *image);
gint                gimp_image_get_n_channels           (const GimpImage *image);
gint                gimp_image_get_n_vectors            (const GimpImage *image);
GList *             gimp_image_get_layer_iter           (const GimpImage *image);
GList *             gimp_image_get_channel_iter         (const GimpImage *image);
GList *             gimp_image_get_vectors_iter         (const GimpImage *image);
GList *             gimp_image_get_layer_list           (const GimpImage *image);
GList *             gimp_image_get_channel_list         (const GimpImage *image);
GList *             gimp_image_get_vectors_list         (const GimpImage *image);
GimpDrawable *      gimp_image_get_active_drawable      (const GimpImage *image);
GimpLayer *         gimp_image_get_active_layer         (const GimpImage *image);
GimpChannel *       gimp_image_get_active_channel       (const GimpImage *image);
GimpVectors *       gimp_image_get_active_vectors       (const GimpImage *image);
GimpLayer *         gimp_image_set_active_layer         (GimpImage *image,
                                                         GimpLayer *layer);
GimpChannel *       gimp_image_set_active_channel       (GimpImage *image,
                                                         GimpChannel *channel);
GimpChannel *       gimp_image_unset_active_channel     (GimpImage *image);
GimpVectors *       gimp_image_set_active_vectors       (GimpImage *image,
                                                         GimpVectors *vectors);
GimpLayer *         gimp_image_get_layer_by_tattoo      (const GimpImage *image,
                                                         GimpTattoo tattoo);
GimpChannel *       gimp_image_get_channel_by_tattoo    (const GimpImage *image,
                                                         GimpTattoo tattoo);
GimpVectors *       gimp_image_get_vectors_by_tattoo    (const GimpImage *image,
                                                         GimpTattoo tattoo);
GimpLayer *         gimp_image_get_layer_by_name        (const GimpImage *image,
                                                         const gchar *name);
GimpChannel *       gimp_image_get_channel_by_name      (const GimpImage *image,
                                                         const gchar *name);
GimpVectors *       gimp_image_get_vectors_by_name      (const GimpImage *image,
                                                         const gchar *name);
gboolean            gimp_image_reorder_item             (GimpImage *image,
                                                         GimpItem *item,
                                                         GimpItem *new_parent,
                                                         gint new_index,
                                                         gboolean push_undo,
                                                         const gchar *undo_desc);
gboolean            gimp_image_raise_item               (GimpImage *image,
                                                         GimpItem *item,
                                                         GError **error);
gboolean            gimp_image_raise_item_to_top        (GimpImage *image,
                                                         GimpItem *item);
gboolean            gimp_image_lower_item               (GimpImage *image,
                                                         GimpItem *item,
                                                         GError **error);
gboolean            gimp_image_lower_item_to_bottom     (GimpImage *image,
                                                         GimpItem *item);
gboolean            gimp_image_add_layer                (GimpImage *image,
                                                         GimpLayer *layer,
                                                         GimpLayer *parent,
                                                         gint position,
                                                         gboolean push_undo);
void                gimp_image_remove_layer             (GimpImage *image,
                                                         GimpLayer *layer,
                                                         gboolean push_undo,
                                                         GimpLayer *new_active);
void                gimp_image_add_layers               (GimpImage *image,
                                                         GList *layers,
                                                         GimpLayer *parent,
                                                         gint position,
                                                         gint x,
                                                         gint y,
                                                         gint width,
                                                         gint height,
                                                         const gchar *undo_desc);
gboolean            gimp_image_add_channel              (GimpImage *image,
                                                         GimpChannel *channel,
                                                         GimpChannel *parent,
                                                         gint position,
                                                         gboolean push_undo);
void                gimp_image_remove_channel           (GimpImage *image,
                                                         GimpChannel *channel,
                                                         gboolean push_undo,
                                                         GimpChannel *new_active);
gboolean            gimp_image_add_vectors              (GimpImage *image,
                                                         GimpVectors *vectors,
                                                         GimpVectors *parent,
                                                         gint position,
                                                         gboolean push_undo);
void                gimp_image_remove_vectors           (GimpImage *image,
                                                         GimpVectors *vectors,
                                                         gboolean push_undo,
                                                         GimpVectors *new_active);
gboolean            gimp_image_coords_in_active_pickable
                                                        (GimpImage *image,
                                                         const GimpCoords *coords,
                                                         gboolean sample_merged,
                                                         gboolean selected_only);
void                gimp_image_invalidate_previews      (GimpImage *image);
const gchar *       gimp_image_get_string_untitled      (void);

Object Hierarchy

  GObject
   +----GimpObject
         +----GimpViewable
               +----GimpImage

Implemented Interfaces

GimpImage implements GimpConfigInterface and GimpColorManagedInterface.

Properties

  "base-type"                GimpImageBaseType     : Read / Write / Construct
  "gimp"                     Gimp*                 : Read / Write / Construct Only
  "height"                   gint                  : Read / Write / Construct
  "id"                       gint                  : Read
  "width"                    gint                  : Read / Write / Construct

Signals

  "active-channel-changed"                         : Run First
  "active-layer-changed"                           : Run First
  "active-vectors-changed"                         : Run First
  "alpha-changed"                                  : Run First
  "clean"                                          : Run First
  "colormap-changed"                               : Run First
  "component-active-changed"                       : Run First
  "component-visibility-changed"                   : Run First
  "dirty"                                          : Run First
  "exported"                                       : Run First
  "floating-selection-changed"                     : Run First
  "guide-added"                                    : Run First
  "guide-moved"                                    : Run First
  "guide-removed"                                  : Run First
  "mask-changed"                                   : Run First
  "mode-changed"                                   : Run First
  "parasite-attached"                              : Run First
  "parasite-detached"                              : Run First
  "quick-mask-changed"                             : Run First
  "resolution-changed"                             : Run First
  "sample-point-added"                             : Run First
  "sample-point-moved"                             : Run First
  "sample-point-removed"                           : Run First
  "saved"                                          : Run First
  "selection-invalidate"                           : Run First
  "size-changed-detailed"                          : Run First
  "undo-event"                                     : Run First
  "unit-changed"                                   : Run First

Description

Details

GIMP_IMAGE_TYPE_IS_RGB()

#define             GIMP_IMAGE_TYPE_IS_RGB(t)


GIMP_IMAGE_TYPE_IS_GRAY()

#define             GIMP_IMAGE_TYPE_IS_GRAY(t)


GIMP_IMAGE_TYPE_IS_INDEXED()

#define             GIMP_IMAGE_TYPE_IS_INDEXED(t)


GIMP_IMAGE_TYPE_HAS_ALPHA()

#define             GIMP_IMAGE_TYPE_HAS_ALPHA(t)


GIMP_IMAGE_TYPE_WITH_ALPHA()

#define             GIMP_IMAGE_TYPE_WITH_ALPHA(t)


GIMP_IMAGE_TYPE_WITHOUT_ALPHA()

#define             GIMP_IMAGE_TYPE_WITHOUT_ALPHA(t)


GIMP_IMAGE_TYPE_BYTES()

#define             GIMP_IMAGE_TYPE_BYTES(t)


GIMP_IMAGE_TYPE_BASE_TYPE()

#define             GIMP_IMAGE_TYPE_BASE_TYPE(t)


GIMP_IMAGE_TYPE_FROM_BASE_TYPE()

#define             GIMP_IMAGE_TYPE_FROM_BASE_TYPE(b)


GIMP_IMAGE_ACTIVE_PARENT

#define GIMP_IMAGE_ACTIVE_PARENT           ((gpointer) 1)


struct GimpImageFlushAccumulator

struct GimpImageFlushAccumulator {
  gboolean alpha_changed;
  gboolean mask_changed;
  gboolean floating_selection_changed;
  gboolean preview_invalidated;
};


GIMP_IMAGE_GET_PRIVATE()

#define             GIMP_IMAGE_GET_PRIVATE(image)


GimpImage

typedef struct _GimpImage GimpImage;


struct GimpImagePrivate

struct GimpImagePrivate {
  gint               ID;                    /*  provides a unique ID         */

  GimpPlugInProcedure *load_proc;           /*  procedure used for loading   */
  GimpPlugInProcedure *save_proc;           /*  last save procedure used     */

  gchar             *display_name;          /*  display basename             */
  gchar             *display_path;          /*  display full path            */
  gint               width;                 /*  width in pixels              */
  gint               height;                /*  height in pixels             */
  gdouble            xresolution;           /*  image x-res, in dpi          */
  gdouble            yresolution;           /*  image y-res, in dpi          */
  GimpUnit           resolution_unit;       /*  resolution unit              */
  GimpImageBaseType  base_type;             /*  base gimp_image type         */

  guchar            *colormap;              /*  colormap (for indexed)       */
  gint               n_colors;              /*  # of colors (for indexed)    */
  GimpPalette       *palette;               /*  palette of colormap          */

  gint               dirty;                 /*  dirty flag -- # of ops       */
  guint              dirty_time;            /*  time when image became dirty */
  gint               export_dirty;          /*  'dirty' but for export       */

  gint               undo_freeze_count;     /*  counts the _freeze's         */

  gint               instance_count;        /*  number of instances          */
  gint               disp_count;            /*  number of displays           */

  GimpTattoo         tattoo_state;          /*  the last used tattoo         */

  GimpProjection    *projection;            /*  projection layers & channels */
  GeglNode          *graph;                 /*  GEGL projection graph        */

  GList             *guides;                /*  guides                       */
  GimpGrid          *grid;                  /*  grid                         */
  GList             *sample_points;         /*  color sample points          */

  /*  Layer/Channel attributes  */
  GimpItemTree      *layers;                /*  the tree of layers           */
  GimpItemTree      *channels;              /*  the tree of masks            */
  GimpItemTree      *vectors;               /*  the tree of vectors          */
  GSList            *layer_stack;           /*  the layers in MRU order      */

  GQuark             layer_alpha_handler;
  GQuark             channel_name_changed_handler;
  GQuark             channel_color_changed_handler;

  GimpLayer         *floating_sel;          /*  the FS layer                 */
  GimpChannel       *selection_mask;        /*  the selection mask channel   */

  GimpParasiteList  *parasites;             /*  Plug-in parasite data        */

  gboolean           visible[MAX_CHANNELS]; /*  visible channels             */
  gboolean           active[MAX_CHANNELS];  /*  active channels              */

  gboolean           quick_mask_state;      /*  TRUE if quick mask is on       */
  gboolean           quick_mask_inverted;   /*  TRUE if quick mask is inverted */
  GimpRGB            quick_mask_color;      /*  rgba triplet of the color      */

  /*  Undo apparatus  */
  GimpUndoStack     *undo_stack;            /*  stack for undo operations    */
  GimpUndoStack     *redo_stack;            /*  stack for redo operations    */
  gint               group_count;           /*  nested undo groups           */
  GimpUndoType       pushing_undo_group;    /*  undo group status flag       */

  /*  Preview  */
  TempBuf           *preview;               /*  the projection preview       */

  /*  Signal emmision accumulator  */
  GimpImageFlushAccumulator  flush_accum;
};


gimp_image_new ()

GimpImage *         gimp_image_new                      (Gimp *gimp,
                                                         gint width,
                                                         gint height,
                                                         GimpImageBaseType base_type);


gimp_image_base_type ()

GimpImageBaseType   gimp_image_base_type                (const GimpImage *image);


gimp_image_base_type_with_alpha ()

GimpImageType       gimp_image_base_type_with_alpha     (const GimpImage *image);


gimp_image_get_combination_mode ()

CombinationMode     gimp_image_get_combination_mode     (GimpImageType dest_type,
                                                         gint src_bytes);


gimp_image_get_ID ()

gint                gimp_image_get_ID                   (const GimpImage *image);


gimp_image_get_by_ID ()

GimpImage *         gimp_image_get_by_ID                (Gimp *gimp,
                                                         gint id);


gimp_image_set_uri ()

void                gimp_image_set_uri                  (GimpImage *image,
                                                         const gchar *uri);


gimp_image_get_uri ()

const gchar *       gimp_image_get_uri                  (const GimpImage *image);

Get the URI of the XCF image, or NULL if there is no URI.

image :

A GimpImage.

Returns :

The URI, or NULL.

gimp_image_get_uri_or_untitled ()

const gchar *       gimp_image_get_uri_or_untitled      (const GimpImage *image);

Get the URI of the XCF image, or "Untitled" if there is no URI.

image :

A GimpImage.

Returns :

The URI, or "Untitled".

gimp_image_get_any_uri ()

const gchar *       gimp_image_get_any_uri              (const GimpImage *image);

image :

A GimpImage.

Returns :

The XCF file URI, the imported file URI, or the exported file URI, in that order of precedence.

gimp_image_set_imported_uri ()

void                gimp_image_set_imported_uri         (GimpImage *image,
                                                         const gchar *uri);

Sets the URI this file was imported from.

image :

A GimpImage.

gimp_image_get_imported_uri ()

const gchar *       gimp_image_get_imported_uri         (const GimpImage *image);

image :

A GimpImage.

Returns :

The URI of the imported image, or NULL if the image has been saved as XCF after it was imported.

gimp_image_set_exported_uri ()

void                gimp_image_set_exported_uri         (GimpImage *image,
                                                         const gchar *uri);

Sets the URI this file was last exported to. Note that saving as XCF is not "exporting".

image :

A GimpImage.

gimp_image_get_exported_uri ()

const gchar *       gimp_image_get_exported_uri         (const GimpImage *image);

image :

A GimpImage.

Returns :

The URI of the image last exported from this XCF file, or NULL if the image has never been exported.

gimp_image_set_save_a_copy_uri ()

void                gimp_image_set_save_a_copy_uri      (GimpImage *image,
                                                         const gchar *uri);

Set the URI to the last copy this XCF file was saved to through the "save a copy" action.

image :

A GimpImage.

gimp_image_get_save_a_copy_uri ()

const gchar *       gimp_image_get_save_a_copy_uri      (const GimpImage *image);

image :

A GimpImage.

Returns :

The URI of the last copy that was saved of this XCF file.

gimp_image_set_filename ()

void                gimp_image_set_filename             (GimpImage *image,
                                                         const gchar *filename);


gimp_image_get_filename ()

gchar *             gimp_image_get_filename             (const GimpImage *image);


gimp_image_get_display_name ()

const gchar *       gimp_image_get_display_name         (GimpImage *image);


gimp_image_get_load_proc ()

GimpPlugInProcedure * gimp_image_get_load_proc          (const GimpImage *image);


gimp_image_set_load_proc ()

void                gimp_image_set_load_proc            (GimpImage *image,
                                                         GimpPlugInProcedure *proc);


gimp_image_set_save_proc ()

void                gimp_image_set_save_proc            (GimpImage *image,
                                                         GimpPlugInProcedure *proc);


gimp_image_get_save_proc ()

GimpPlugInProcedure * gimp_image_get_save_proc          (const GimpImage *image);


gimp_image_saved ()

void                gimp_image_saved                    (GimpImage *image,
                                                         const gchar *uri);

Emits the "saved" signal, indicating that image was saved to the location specified by uri.


gimp_image_exported ()

void                gimp_image_exported                 (GimpImage *image,
                                                         const gchar *uri);

Emits the "exported" signal, indicating that image was exported to the location specified by uri.


gimp_image_set_resolution ()

void                gimp_image_set_resolution           (GimpImage *image,
                                                         gdouble xres,
                                                         gdouble yres);


gimp_image_get_resolution ()

void                gimp_image_get_resolution           (const GimpImage *image,
                                                         gdouble *xres,
                                                         gdouble *yres);


gimp_image_resolution_changed ()

void                gimp_image_resolution_changed       (GimpImage *image);


gimp_image_set_unit ()

void                gimp_image_set_unit                 (GimpImage *image,
                                                         GimpUnit unit);


gimp_image_get_unit ()

GimpUnit            gimp_image_get_unit                 (const GimpImage *image);


gimp_image_unit_changed ()

void                gimp_image_unit_changed             (GimpImage *image);


gimp_image_get_width ()

gint                gimp_image_get_width                (const GimpImage *image);


gimp_image_get_height ()

gint                gimp_image_get_height               (const GimpImage *image);


gimp_image_has_alpha ()

gboolean            gimp_image_has_alpha                (const GimpImage *image);


gimp_image_is_empty ()

gboolean            gimp_image_is_empty                 (const GimpImage *image);


gimp_image_get_floating_selection ()

GimpLayer *         gimp_image_get_floating_selection   (const GimpImage *image);


gimp_image_set_floating_selection ()

void                gimp_image_set_floating_selection   (GimpImage *image,
                                                         GimpLayer *floating_sel);


gimp_image_floating_selection_changed ()

void                gimp_image_floating_selection_changed
                                                        (GimpImage *image);


gimp_image_get_mask ()

GimpChannel *       gimp_image_get_mask                 (const GimpImage *image);


gimp_image_mask_changed ()

void                gimp_image_mask_changed             (GimpImage *image);


gimp_image_get_component_index ()

gint                gimp_image_get_component_index      (const GimpImage *image,
                                                         GimpChannelType channel);


gimp_image_set_component_active ()

void                gimp_image_set_component_active     (GimpImage *image,
                                                         GimpChannelType type,
                                                         gboolean active);


gimp_image_get_component_active ()

gboolean            gimp_image_get_component_active     (const GimpImage *image,
                                                         GimpChannelType type);


gimp_image_get_active_array ()

void                gimp_image_get_active_array         (const GimpImage *image,
                                                         gboolean *components);


gimp_image_set_component_visible ()

void                gimp_image_set_component_visible    (GimpImage *image,
                                                         GimpChannelType type,
                                                         gboolean visible);


gimp_image_get_component_visible ()

gboolean            gimp_image_get_component_visible    (const GimpImage *image,
                                                         GimpChannelType type);


gimp_image_get_visible_array ()

void                gimp_image_get_visible_array        (const GimpImage *image,
                                                         gboolean *components);


gimp_image_mode_changed ()

void                gimp_image_mode_changed             (GimpImage *image);


gimp_image_alpha_changed ()

void                gimp_image_alpha_changed            (GimpImage *image);


gimp_image_invalidate ()

void                gimp_image_invalidate               (GimpImage *image,
                                                         gint x,
                                                         gint y,
                                                         gint width,
                                                         gint height);


gimp_image_guide_added ()

void                gimp_image_guide_added              (GimpImage *image,
                                                         GimpGuide *guide);


gimp_image_guide_removed ()

void                gimp_image_guide_removed            (GimpImage *image,
                                                         GimpGuide *guide);


gimp_image_guide_moved ()

void                gimp_image_guide_moved              (GimpImage *image,
                                                         GimpGuide *guide);


gimp_image_sample_point_added ()

void                gimp_image_sample_point_added       (GimpImage *image,
                                                         GimpSamplePoint *sample_point);


gimp_image_sample_point_removed ()

void                gimp_image_sample_point_removed     (GimpImage *image,
                                                         GimpSamplePoint *sample_point);


gimp_image_sample_point_moved ()

void                gimp_image_sample_point_moved       (GimpImage *image,
                                                         GimpSamplePoint *sample_point);


gimp_image_colormap_changed ()

void                gimp_image_colormap_changed         (GimpImage *image,
                                                         gint col);


gimp_image_selection_invalidate ()

void                gimp_image_selection_invalidate     (GimpImage *image);


gimp_image_quick_mask_changed ()

void                gimp_image_quick_mask_changed       (GimpImage *image);


gimp_image_size_changed_detailed ()

void                gimp_image_size_changed_detailed    (GimpImage *image,
                                                         gint previous_origin_x,
                                                         gint previous_origin_y,
                                                         gint previous_width,
                                                         gint previous_height);

Emits the size-changed-detailed signal that is typically used to adjust the position of the image in the display shell on various operations, e.g. crop.

This function makes sure that GimpViewable::size-changed is also emitted.


gimp_image_undo_event ()

void                gimp_image_undo_event               (GimpImage *image,
                                                         GimpUndoEvent event,
                                                         GimpUndo *undo);


gimp_image_dirty ()

gint                gimp_image_dirty                    (GimpImage *image,
                                                         GimpDirtyMask dirty_mask);


gimp_image_clean ()

gint                gimp_image_clean                    (GimpImage *image,
                                                         GimpDirtyMask dirty_mask);


gimp_image_clean_all ()

void                gimp_image_clean_all                (GimpImage *image);


gimp_image_is_dirty ()

gint                gimp_image_is_dirty                 (const GimpImage *image);

Returns :

True if the image is dirty, false otherwise.

gimp_image_is_export_dirty ()

gboolean            gimp_image_is_export_dirty          (const GimpImage *image);

Returns :

True if the image export is dirty, false otherwise.

gimp_image_export_clean_all ()

void                gimp_image_export_clean_all         (GimpImage *image);


gimp_image_get_dirty_time ()

gint                gimp_image_get_dirty_time           (const GimpImage *image);


gimp_image_flush ()

void                gimp_image_flush                    (GimpImage *image);


gimp_image_get_display_count ()

gint                gimp_image_get_display_count        (const GimpImage *image);


gimp_image_inc_display_count ()

void                gimp_image_inc_display_count        (GimpImage *image);


gimp_image_dec_display_count ()

void                gimp_image_dec_display_count        (GimpImage *image);


gimp_image_get_instance_count ()

gint                gimp_image_get_instance_count       (const GimpImage *image);


gimp_image_inc_instance_count ()

void                gimp_image_inc_instance_count       (GimpImage *image);


gimp_image_get_projection ()

GimpProjection *    gimp_image_get_projection           (const GimpImage *image);


gimp_image_get_foreground ()

void                gimp_image_get_foreground           (const GimpImage *image,
                                                         GimpContext *context,
                                                         GimpImageType dest_type,
                                                         guchar *fg);


gimp_image_get_background ()

void                gimp_image_get_background           (const GimpImage *image,
                                                         GimpContext *context,
                                                         GimpImageType dest_type,
                                                         guchar *bg);


gimp_image_get_color ()

void                gimp_image_get_color                (const GimpImage *src_image,
                                                         GimpImageType src_type,
                                                         const guchar *src,
                                                         guchar *rgba);


gimp_image_transform_color ()

void                gimp_image_transform_color          (const GimpImage *dest_image,
                                                         GimpImageType dest_type,
                                                         guchar *dest,
                                                         GimpImageBaseType src_type,
                                                         const guchar *src);


gimp_image_transform_rgb ()

void                gimp_image_transform_rgb            (const GimpImage *dest_image,
                                                         GimpImageType dest_type,
                                                         const GimpRGB *rgb,
                                                         guchar *color);


gimp_image_transform_temp_buf ()

TempBuf *           gimp_image_transform_temp_buf       (const GimpImage *dest_image,
                                                         GimpImageType dest_type,
                                                         TempBuf *temp_buf,
                                                         gboolean *new_buf);


gimp_image_parasite_find ()

const GimpParasite * gimp_image_parasite_find           (const GimpImage *image,
                                                         const gchar *name);


gimp_image_parasite_list ()

gchar **            gimp_image_parasite_list            (const GimpImage *image,
                                                         gint *count);


gimp_image_parasite_attach ()

void                gimp_image_parasite_attach          (GimpImage *image,
                                                         const GimpParasite *parasite);


gimp_image_parasite_detach ()

void                gimp_image_parasite_detach          (GimpImage *image,
                                                         const gchar *name);


gimp_image_get_new_tattoo ()

GimpTattoo          gimp_image_get_new_tattoo           (GimpImage *image);


gimp_image_set_tattoo_state ()

gboolean            gimp_image_set_tattoo_state         (GimpImage *image,
                                                         GimpTattoo val);


gimp_image_get_tattoo_state ()

GimpTattoo          gimp_image_get_tattoo_state         (GimpImage *image);


gimp_image_get_layer_tree ()

GimpItemTree *      gimp_image_get_layer_tree           (const GimpImage *image);


gimp_image_get_channel_tree ()

GimpItemTree *      gimp_image_get_channel_tree         (const GimpImage *image);


gimp_image_get_vectors_tree ()

GimpItemTree *      gimp_image_get_vectors_tree         (const GimpImage *image);


gimp_image_get_layers ()

GimpContainer *     gimp_image_get_layers               (const GimpImage *image);


gimp_image_get_channels ()

GimpContainer *     gimp_image_get_channels             (const GimpImage *image);


gimp_image_get_vectors ()

GimpContainer *     gimp_image_get_vectors              (const GimpImage *image);


gimp_image_get_n_layers ()

gint                gimp_image_get_n_layers             (const GimpImage *image);


gimp_image_get_n_channels ()

gint                gimp_image_get_n_channels           (const GimpImage *image);


gimp_image_get_n_vectors ()

gint                gimp_image_get_n_vectors            (const GimpImage *image);


gimp_image_get_layer_iter ()

GList *             gimp_image_get_layer_iter           (const GimpImage *image);


gimp_image_get_channel_iter ()

GList *             gimp_image_get_channel_iter         (const GimpImage *image);


gimp_image_get_vectors_iter ()

GList *             gimp_image_get_vectors_iter         (const GimpImage *image);


gimp_image_get_layer_list ()

GList *             gimp_image_get_layer_list           (const GimpImage *image);


gimp_image_get_channel_list ()

GList *             gimp_image_get_channel_list         (const GimpImage *image);


gimp_image_get_vectors_list ()

GList *             gimp_image_get_vectors_list         (const GimpImage *image);


gimp_image_get_active_drawable ()

GimpDrawable *      gimp_image_get_active_drawable      (const GimpImage *image);


gimp_image_get_active_layer ()

GimpLayer *         gimp_image_get_active_layer         (const GimpImage *image);


gimp_image_get_active_channel ()

GimpChannel *       gimp_image_get_active_channel       (const GimpImage *image);


gimp_image_get_active_vectors ()

GimpVectors *       gimp_image_get_active_vectors       (const GimpImage *image);


gimp_image_set_active_layer ()

GimpLayer *         gimp_image_set_active_layer         (GimpImage *image,
                                                         GimpLayer *layer);


gimp_image_set_active_channel ()

GimpChannel *       gimp_image_set_active_channel       (GimpImage *image,
                                                         GimpChannel *channel);


gimp_image_unset_active_channel ()

GimpChannel *       gimp_image_unset_active_channel     (GimpImage *image);


gimp_image_set_active_vectors ()

GimpVectors *       gimp_image_set_active_vectors       (GimpImage *image,
                                                         GimpVectors *vectors);


gimp_image_get_layer_by_tattoo ()

GimpLayer *         gimp_image_get_layer_by_tattoo      (const GimpImage *image,
                                                         GimpTattoo tattoo);


gimp_image_get_channel_by_tattoo ()

GimpChannel *       gimp_image_get_channel_by_tattoo    (const GimpImage *image,
                                                         GimpTattoo tattoo);


gimp_image_get_vectors_by_tattoo ()

GimpVectors *       gimp_image_get_vectors_by_tattoo    (const GimpImage *image,
                                                         GimpTattoo tattoo);


gimp_image_get_layer_by_name ()

GimpLayer *         gimp_image_get_layer_by_name        (const GimpImage *image,
                                                         const gchar *name);


gimp_image_get_channel_by_name ()

GimpChannel *       gimp_image_get_channel_by_name      (const GimpImage *image,
                                                         const gchar *name);


gimp_image_get_vectors_by_name ()

GimpVectors *       gimp_image_get_vectors_by_name      (const GimpImage *image,
                                                         const gchar *name);


gimp_image_reorder_item ()

gboolean            gimp_image_reorder_item             (GimpImage *image,
                                                         GimpItem *item,
                                                         GimpItem *new_parent,
                                                         gint new_index,
                                                         gboolean push_undo,
                                                         const gchar *undo_desc);


gimp_image_raise_item ()

gboolean            gimp_image_raise_item               (GimpImage *image,
                                                         GimpItem *item,
                                                         GError **error);


gimp_image_raise_item_to_top ()

gboolean            gimp_image_raise_item_to_top        (GimpImage *image,
                                                         GimpItem *item);


gimp_image_lower_item ()

gboolean            gimp_image_lower_item               (GimpImage *image,
                                                         GimpItem *item,
                                                         GError **error);


gimp_image_lower_item_to_bottom ()

gboolean            gimp_image_lower_item_to_bottom     (GimpImage *image,
                                                         GimpItem *item);


gimp_image_add_layer ()

gboolean            gimp_image_add_layer                (GimpImage *image,
                                                         GimpLayer *layer,
                                                         GimpLayer *parent,
                                                         gint position,
                                                         gboolean push_undo);


gimp_image_remove_layer ()

void                gimp_image_remove_layer             (GimpImage *image,
                                                         GimpLayer *layer,
                                                         gboolean push_undo,
                                                         GimpLayer *new_active);


gimp_image_add_layers ()

void                gimp_image_add_layers               (GimpImage *image,
                                                         GList *layers,
                                                         GimpLayer *parent,
                                                         gint position,
                                                         gint x,
                                                         gint y,
                                                         gint width,
                                                         gint height,
                                                         const gchar *undo_desc);


gimp_image_add_channel ()

gboolean            gimp_image_add_channel              (GimpImage *image,
                                                         GimpChannel *channel,
                                                         GimpChannel *parent,
                                                         gint position,
                                                         gboolean push_undo);


gimp_image_remove_channel ()

void                gimp_image_remove_channel           (GimpImage *image,
                                                         GimpChannel *channel,
                                                         gboolean push_undo,
                                                         GimpChannel *new_active);


gimp_image_add_vectors ()

gboolean            gimp_image_add_vectors              (GimpImage *image,
                                                         GimpVectors *vectors,
                                                         GimpVectors *parent,
                                                         gint position,
                                                         gboolean push_undo);


gimp_image_remove_vectors ()

void                gimp_image_remove_vectors           (GimpImage *image,
                                                         GimpVectors *vectors,
                                                         gboolean push_undo,
                                                         GimpVectors *new_active);


gimp_image_coords_in_active_pickable ()

gboolean            gimp_image_coords_in_active_pickable
                                                        (GimpImage *image,
                                                         const GimpCoords *coords,
                                                         gboolean sample_merged,
                                                         gboolean selected_only);


gimp_image_invalidate_previews ()

void                gimp_image_invalidate_previews      (GimpImage *image);


gimp_image_get_string_untitled ()

const gchar *       gimp_image_get_string_untitled      (void);

Property Details

The "base-type" property

  "base-type"                GimpImageBaseType     : Read / Write / Construct

Default value: GIMP_RGB


The "gimp" property

  "gimp"                     Gimp*                 : Read / Write / Construct Only


The "height" property

  "height"                   gint                  : Read / Write / Construct

Allowed values: [1,262144]

Default value: 1


The "id" property

  "id"                       gint                  : Read

Allowed values: >= 0

Default value: 0


The "width" property

  "width"                    gint                  : Read / Write / Construct

Allowed values: [1,262144]

Default value: 1

Signal Details

The "active-channel-changed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "active-layer-changed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "active-vectors-changed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "alpha-changed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "clean" signal

void                user_function                      (GimpImage    *gimpimage,
                                                        GimpDirtyMask arg1,
                                                        gpointer      user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "colormap-changed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gint       arg1,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "component-active-changed" signal

void                user_function                      (GimpImage      *gimpimage,
                                                        GimpChannelType arg1,
                                                        gpointer        user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "component-visibility-changed" signal

void                user_function                      (GimpImage      *gimpimage,
                                                        GimpChannelType arg1,
                                                        gpointer        user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "dirty" signal

void                user_function                      (GimpImage    *gimpimage,
                                                        GimpDirtyMask arg1,
                                                        gpointer      user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "exported" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gchar     *arg1,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "floating-selection-changed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "guide-added" signal

void                user_function                      (GimpImage *gimpimage,
                                                        GimpGuide *arg1,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "guide-moved" signal

void                user_function                      (GimpImage *gimpimage,
                                                        GimpGuide *arg1,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "guide-removed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        GimpGuide *arg1,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "mask-changed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "mode-changed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "parasite-attached" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gchar     *arg1,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "parasite-detached" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gchar     *arg1,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "quick-mask-changed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "resolution-changed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "sample-point-added" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   arg1,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "sample-point-moved" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   arg1,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "sample-point-removed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   arg1,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "saved" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gchar     *arg1,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "selection-invalidate" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "size-changed-detailed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gint       arg1,
                                                        gint       arg2,
                                                        gint       arg3,
                                                        gint       arg4,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "undo-event" signal

void                user_function                      (GimpImage    *gimpimage,
                                                        GimpUndoEvent arg1,
                                                        GimpUndo     *arg2,
                                                        gpointer      user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "unit-changed" signal

void                user_function                      (GimpImage *gimpimage,
                                                        gpointer   user_data)      : Run First

gimpimage :

the object which received the signal.

user_data :

user data set when the signal handler was connected.