GimpColorProfile * gimp_image_get_color_profile (GimpImage *image) { g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); return GIMP_IMAGE_GET_PRIVATE (image)->color_profile; }
gboolean gimp_image_get_is_color_managed (GimpImage *image) { g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE); return GIMP_IMAGE_GET_PRIVATE (image)->is_color_managed; }
mask = GIMP_DRAWABLE (gimp_image_get_mask (image)); new_mask = GIMP_DRAWABLE (gimp_image_get_mask (new_image)); gegl_buffer_copy (gimp_drawable_get_buffer (mask), NULL, gimp_drawable_get_buffer (new_mask), NULL); GIMP_CHANNEL (new_mask)->bounds_known = FALSE; GIMP_CHANNEL (new_mask)->boundary_known = FALSE; } static void gimp_image_duplicate_components (GimpImage *image, GimpImage *new_image) { GimpImagePrivate *private = GIMP_IMAGE_GET_PRIVATE (image); GimpImagePrivate *new_private = GIMP_IMAGE_GET_PRIVATE (new_image); gint count; for (count = 0; count < MAX_CHANNELS; count++) { new_private->visible[count] = private->visible[count]; new_private->active[count] = private->active[count]; } } static void gimp_image_duplicate_guides (GimpImage *image, GimpImage *new_image) { GList *list;
static void gimp_image_undo_pop (GimpUndo *undo, GimpUndoMode undo_mode, GimpUndoAccumulator *accum) { GimpImageUndo *image_undo = GIMP_IMAGE_UNDO (undo); GimpImage *image = undo->image; GimpImagePrivate *private = GIMP_IMAGE_GET_PRIVATE (image); GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum); switch (undo->undo_type) { case GIMP_UNDO_IMAGE_TYPE: { GimpImageBaseType base_type; base_type = image_undo->base_type; image_undo->base_type = gimp_image_base_type (image); g_object_set (image, "base-type", base_type, NULL); gimp_image_colormap_changed (image, -1); if (image_undo->base_type != gimp_image_base_type (image)) accum->mode_changed = TRUE; } break; case GIMP_UNDO_IMAGE_SIZE: { gint width; gint height; gint previous_origin_x; gint previous_origin_y; gint previous_width; gint previous_height; width = image_undo->width; height = image_undo->height; previous_origin_x = image_undo->previous_origin_x; previous_origin_y = image_undo->previous_origin_y; previous_width = image_undo->previous_width; previous_height = image_undo->previous_height; /* Transform to a redo */ image_undo->width = gimp_image_get_width (image); image_undo->height = gimp_image_get_height (image); image_undo->previous_origin_x = -previous_origin_x; image_undo->previous_origin_y = -previous_origin_y; image_undo->previous_width = width; image_undo->previous_height = height; g_object_set (image, "width", width, "height", height, NULL); gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (gimp_image_get_mask (image))); if (gimp_image_get_width (image) != image_undo->width || gimp_image_get_height (image) != image_undo->height) { accum->size_changed = TRUE; accum->previous_origin_x = previous_origin_x; accum->previous_origin_y = previous_origin_y; accum->previous_width = previous_width; accum->previous_height = previous_height; } } break; case GIMP_UNDO_IMAGE_RESOLUTION: { gdouble xres; gdouble yres; gimp_image_get_resolution (image, &xres, &yres); if (ABS (image_undo->xresolution - xres) >= 1e-5 || ABS (image_undo->yresolution - yres) >= 1e-5) { private->xresolution = image_undo->xresolution; private->yresolution = image_undo->yresolution; image_undo->xresolution = xres; image_undo->yresolution = yres; accum->resolution_changed = TRUE; } }