Commit 67b00677 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

moved the image flip entries to the Image->Transform submenu and added

2003-05-19  Michael Natterer  <mitch@gimp.org>

	* app/gui/image-menu.c: moved the image flip entries to the
	Image->Transform submenu and added flip entries to
	Layer->Transform. Cleaned up the transform submenus.

	* app/gui/drawable-commands.[ch]: added
	drawable_flip_cmd_callback().

	* tools/pdbgen/pdb/image.pdb: added a PDB wrapper for
	gimp_image_flip().

	* libgimp/gimpimage_pdb.[ch]
	* app/pdb/image_cmds.c
	* app/pdb/internal_procs.c: regenerated.
parent 48b3b263
2003-05-19 Michael Natterer <mitch@gimp.org>
* app/gui/image-menu.c: moved the image flip entries to the
Image->Transform submenu and added flip entries to
Layer->Transform. Cleaned up the transform submenus.
* app/gui/drawable-commands.[ch]: added
drawable_flip_cmd_callback().
* tools/pdbgen/pdb/image.pdb: added a PDB wrapper for
gimp_image_flip().
* libgimp/gimpimage_pdb.[ch]
* app/pdb/image_cmds.c
* app/pdb/internal_procs.c: regenerated.
2003-05-19 Sven Neumann <sven@gimp.org>
* app/base/temp-buf.c (temp_buf_to_color) (temp_buf_to_gray):
......@@ -120,6 +120,40 @@ drawable_equalize_cmd_callback (GtkWidget *widget,
gimp_image_flush (gimage);
}
void
drawable_flip_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
{
GimpImage *gimage;
GimpDrawable *active_drawable;
GimpItem *item;
gint off_x, off_y;
gdouble axis = 0.0;
return_if_no_drawable (gimage, active_drawable, data);
item = GIMP_ITEM (active_drawable);
gimp_item_offsets (item, &off_x, &off_y);
switch ((GimpOrientationType) action)
{
case GIMP_ORIENTATION_HORIZONTAL:
axis = ((gdouble) off_x + (gdouble) gimp_item_width (item) / 2.0);
break;
case GIMP_ORIENTATION_VERTICAL:
axis = ((gdouble) off_y + (gdouble) gimp_item_height (item) / 2.0);
break;
default:
break;
}
gimp_item_flip (item, (GimpOrientationType) action, axis, TRUE);
gimp_image_flush (gimage);
}
void
drawable_offset_cmd_callback (GtkWidget *widget,
gpointer data)
......
......@@ -120,6 +120,40 @@ drawable_equalize_cmd_callback (GtkWidget *widget,
gimp_image_flush (gimage);
}
void
drawable_flip_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
{
GimpImage *gimage;
GimpDrawable *active_drawable;
GimpItem *item;
gint off_x, off_y;
gdouble axis = 0.0;
return_if_no_drawable (gimage, active_drawable, data);
item = GIMP_ITEM (active_drawable);
gimp_item_offsets (item, &off_x, &off_y);
switch ((GimpOrientationType) action)
{
case GIMP_ORIENTATION_HORIZONTAL:
axis = ((gdouble) off_x + (gdouble) gimp_item_width (item) / 2.0);
break;
case GIMP_ORIENTATION_VERTICAL:
axis = ((gdouble) off_y + (gdouble) gimp_item_height (item) / 2.0);
break;
default:
break;
}
gimp_item_flip (item, (GimpOrientationType) action, axis, TRUE);
gimp_image_flush (gimage);
}
void
drawable_offset_cmd_callback (GtkWidget *widget,
gpointer data)
......
......@@ -464,9 +464,19 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/Image/Transform */
MENU_BRANCH (N_("/Image/Transform")),
{ { N_("/Image/Transform/Flip Horizontally"), NULL,
image_flip_cmd_callback, GIMP_ORIENTATION_HORIZONTAL,
"<StockItem>", GIMP_STOCK_FLIP_HORIZONTAL },
NULL,
"image/dialogs/flip_image.html", NULL },
{ { N_("/Image/Transform/Flip Vertically"), NULL,
image_flip_cmd_callback, GIMP_ORIENTATION_VERTICAL,
"<StockItem>", GIMP_STOCK_FLIP_VERTICAL },
NULL,
"image/dialogs/flip_image.html", NULL },
MENU_SEPARATOR ("/Image/Transform/---"),
MENU_SEPARATOR ("/Image/Transform/---"),
MENU_SEPARATOR ("/Image/---"),
......@@ -480,16 +490,6 @@ GimpItemFactoryEntry image_menu_entries[] =
"<StockItem>", GIMP_STOCK_SCALE },
NULL,
"image/dialogs/scale_image.html", NULL },
{ { N_("/Image/Flip Image Horizontally"), NULL,
image_flip_cmd_callback, GIMP_ORIENTATION_HORIZONTAL,
"<StockItem>", GIMP_STOCK_FLIP_HORIZONTAL },
NULL,
"image/dialogs/flip_image.html", NULL },
{ { N_("/Image/Flip Image Vertically"), NULL,
image_flip_cmd_callback, GIMP_ORIENTATION_VERTICAL,
"<StockItem>", GIMP_STOCK_FLIP_VERTICAL },
NULL,
"image/dialogs/flip_image.html", NULL },
{ { N_("/Image/Crop Image"), NULL,
image_crop_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_TOOL_CROP },
......@@ -598,6 +598,18 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/Layer/Transform */
{ { N_("/Layer/Transform/Flip Horizontally"), NULL,
drawable_flip_cmd_callback, GIMP_ORIENTATION_HORIZONTAL,
"<StockItem>", GIMP_STOCK_FLIP_HORIZONTAL },
NULL,
"layers/flip_layer.html", NULL },
{ { N_("/Layer/Transform/Flip Vertically"), NULL,
drawable_flip_cmd_callback, GIMP_ORIENTATION_VERTICAL,
"<StockItem>", GIMP_STOCK_FLIP_VERTICAL },
NULL,
"layers/flip_layer.html", NULL },
MENU_SEPARATOR ("/Layer/Transform/---"),
MENU_SEPARATOR ("/Layer/Transform/---"),
{ { N_("/Layer/Transform/Offset..."), "<control><shift>O",
......@@ -885,6 +897,7 @@ image_menu_setup (GimpItemFactory *factory)
{
static const gchar *color_tools[] = { "gimp-color-balance-tool",
"gimp-hue-saturation-tool",
"gimp-colorize-tool",
"gimp-brightness-contrast-tool",
"gimp-threshold-tool",
"gimp-levels-tool",
......@@ -1010,7 +1023,7 @@ image_menu_setup (GimpItemFactory *factory)
}
/* Reorder Rotate plugin menu entries */
pos = 1;
pos = 4;
for (i = 0; i < G_N_ELEMENTS (rotate_plugins); i++)
{
path = g_strconcat ("/Image/Transform/", rotate_plugins[i], NULL);
......@@ -1026,7 +1039,7 @@ image_menu_setup (GimpItemFactory *factory)
}
}
pos = 1;
pos = 4;
for (i = 0; i < G_N_ELEMENTS (rotate_plugins); i++)
{
path = g_strconcat ("/Layer/Transform/", rotate_plugins[i], NULL);
......@@ -1347,6 +1360,9 @@ image_menu_update (GtkItemFactory *item_factory,
SET_SENSITIVE ("/Image/Mode/Grayscale", gdisp && ! is_gray);
SET_SENSITIVE ("/Image/Mode/Indexed...", gdisp && ! is_indexed);
SET_SENSITIVE ("/Image/Transform/Flip Horizontally", gdisp);
SET_SENSITIVE ("/Image/Transform/Flip Vertically", gdisp);
SET_SENSITIVE ("/Image/Canvas Size...", gdisp);
SET_SENSITIVE ("/Image/Scale Image...", gdisp);
SET_SENSITIVE ("/Image/Crop Image", gdisp && sel);
......@@ -1380,7 +1396,9 @@ image_menu_update (GtkItemFactory *item_factory,
SET_SENSITIVE ("/Layer/Scale Layer...", lp && !aux);
SET_SENSITIVE ("/Layer/Crop Layer", lp && !aux && sel);
SET_SENSITIVE ("/Layer/Transform/Offset...", lp);
SET_SENSITIVE ("/Layer/Transform/Flip Horizontally", lp);
SET_SENSITIVE ("/Layer/Transform/Flip Vertically", lp);
SET_SENSITIVE ("/Layer/Transform/Offset...", lp);
SET_SENSITIVE ("/Layer/Colors/Color Balance...", lp && is_rgb);
SET_SENSITIVE ("/Layer/Colors/Hue-Saturation...", lp && is_rgb);
......
......@@ -464,9 +464,19 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/Image/Transform */
MENU_BRANCH (N_("/Image/Transform")),
{ { N_("/Image/Transform/Flip Horizontally"), NULL,
image_flip_cmd_callback, GIMP_ORIENTATION_HORIZONTAL,
"<StockItem>", GIMP_STOCK_FLIP_HORIZONTAL },
NULL,
"image/dialogs/flip_image.html", NULL },
{ { N_("/Image/Transform/Flip Vertically"), NULL,
image_flip_cmd_callback, GIMP_ORIENTATION_VERTICAL,
"<StockItem>", GIMP_STOCK_FLIP_VERTICAL },
NULL,
"image/dialogs/flip_image.html", NULL },
MENU_SEPARATOR ("/Image/Transform/---"),
MENU_SEPARATOR ("/Image/Transform/---"),
MENU_SEPARATOR ("/Image/---"),
......@@ -480,16 +490,6 @@ GimpItemFactoryEntry image_menu_entries[] =
"<StockItem>", GIMP_STOCK_SCALE },
NULL,
"image/dialogs/scale_image.html", NULL },
{ { N_("/Image/Flip Image Horizontally"), NULL,
image_flip_cmd_callback, GIMP_ORIENTATION_HORIZONTAL,
"<StockItem>", GIMP_STOCK_FLIP_HORIZONTAL },
NULL,
"image/dialogs/flip_image.html", NULL },
{ { N_("/Image/Flip Image Vertically"), NULL,
image_flip_cmd_callback, GIMP_ORIENTATION_VERTICAL,
"<StockItem>", GIMP_STOCK_FLIP_VERTICAL },
NULL,
"image/dialogs/flip_image.html", NULL },
{ { N_("/Image/Crop Image"), NULL,
image_crop_cmd_callback, 0,
"<StockItem>", GIMP_STOCK_TOOL_CROP },
......@@ -598,6 +598,18 @@ GimpItemFactoryEntry image_menu_entries[] =
/* <Image>/Layer/Transform */
{ { N_("/Layer/Transform/Flip Horizontally"), NULL,
drawable_flip_cmd_callback, GIMP_ORIENTATION_HORIZONTAL,
"<StockItem>", GIMP_STOCK_FLIP_HORIZONTAL },
NULL,
"layers/flip_layer.html", NULL },
{ { N_("/Layer/Transform/Flip Vertically"), NULL,
drawable_flip_cmd_callback, GIMP_ORIENTATION_VERTICAL,
"<StockItem>", GIMP_STOCK_FLIP_VERTICAL },
NULL,
"layers/flip_layer.html", NULL },
MENU_SEPARATOR ("/Layer/Transform/---"),
MENU_SEPARATOR ("/Layer/Transform/---"),
{ { N_("/Layer/Transform/Offset..."), "<control><shift>O",
......@@ -885,6 +897,7 @@ image_menu_setup (GimpItemFactory *factory)
{
static const gchar *color_tools[] = { "gimp-color-balance-tool",
"gimp-hue-saturation-tool",
"gimp-colorize-tool",
"gimp-brightness-contrast-tool",
"gimp-threshold-tool",
"gimp-levels-tool",
......@@ -1010,7 +1023,7 @@ image_menu_setup (GimpItemFactory *factory)
}
/* Reorder Rotate plugin menu entries */
pos = 1;
pos = 4;
for (i = 0; i < G_N_ELEMENTS (rotate_plugins); i++)
{
path = g_strconcat ("/Image/Transform/", rotate_plugins[i], NULL);
......@@ -1026,7 +1039,7 @@ image_menu_setup (GimpItemFactory *factory)
}
}
pos = 1;
pos = 4;
for (i = 0; i < G_N_ELEMENTS (rotate_plugins); i++)
{
path = g_strconcat ("/Layer/Transform/", rotate_plugins[i], NULL);
......@@ -1347,6 +1360,9 @@ image_menu_update (GtkItemFactory *item_factory,
SET_SENSITIVE ("/Image/Mode/Grayscale", gdisp && ! is_gray);
SET_SENSITIVE ("/Image/Mode/Indexed...", gdisp && ! is_indexed);
SET_SENSITIVE ("/Image/Transform/Flip Horizontally", gdisp);
SET_SENSITIVE ("/Image/Transform/Flip Vertically", gdisp);
SET_SENSITIVE ("/Image/Canvas Size...", gdisp);
SET_SENSITIVE ("/Image/Scale Image...", gdisp);
SET_SENSITIVE ("/Image/Crop Image", gdisp && sel);
......@@ -1380,7 +1396,9 @@ image_menu_update (GtkItemFactory *item_factory,
SET_SENSITIVE ("/Layer/Scale Layer...", lp && !aux);
SET_SENSITIVE ("/Layer/Crop Layer", lp && !aux && sel);
SET_SENSITIVE ("/Layer/Transform/Offset...", lp);
SET_SENSITIVE ("/Layer/Transform/Flip Horizontally", lp);
SET_SENSITIVE ("/Layer/Transform/Flip Vertically", lp);
SET_SENSITIVE ("/Layer/Transform/Offset...", lp);
SET_SENSITIVE ("/Layer/Colors/Color Balance...", lp && is_rgb);
SET_SENSITIVE ("/Layer/Colors/Hue-Saturation...", lp && is_rgb);
......
......@@ -38,6 +38,7 @@
#include "core/gimpimage-colormap.h"
#include "core/gimpimage-crop.h"
#include "core/gimpimage-duplicate.h"
#include "core/gimpimage-flip.h"
#include "core/gimpimage-merge.h"
#include "core/gimpimage-resize.h"
#include "core/gimpimage-scale.h"
......@@ -58,6 +59,7 @@ static ProcRecord image_base_type_proc;
static ProcRecord image_resize_proc;
static ProcRecord image_scale_proc;
static ProcRecord image_crop_proc;
static ProcRecord image_flip_proc;
static ProcRecord image_free_shadow_proc;
static ProcRecord image_get_layers_proc;
static ProcRecord image_get_channels_proc;
......@@ -125,6 +127,7 @@ register_image_procs (Gimp *gimp)
procedural_db_register (gimp, &image_resize_proc);
procedural_db_register (gimp, &image_scale_proc);
procedural_db_register (gimp, &image_crop_proc);
procedural_db_register (gimp, &image_flip_proc);
procedural_db_register (gimp, &image_free_shadow_proc);
procedural_db_register (gimp, &image_get_layers_proc);
procedural_db_register (gimp, &image_get_channels_proc);
......@@ -626,8 +629,9 @@ image_crop_invoker (Gimp *gimp,
if (success)
{
if (new_width > gimage->width || new_height > gimage->height ||
offx > (gimage->width - new_width) ||
if (new_width > gimage->width ||
new_height > gimage->height ||
offx > (gimage->width - new_width) ||
offy > (gimage->height - new_height))
success = FALSE;
else
......@@ -683,6 +687,60 @@ static ProcRecord image_crop_proc =
{ { image_crop_invoker } }
};
static Argument *
image_flip_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpImage *gimage;
gint32 flip_type;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (! GIMP_IS_IMAGE (gimage))
success = FALSE;
flip_type = args[1].value.pdb_int;
if (flip_type < GIMP_ORIENTATION_HORIZONTAL || flip_type > GIMP_ORIENTATION_VERTICAL)
success = FALSE;
if (success)
{
gimp_image_flip (gimage, flip_type, NULL, NULL);
}
return procedural_db_return_args (&image_flip_proc, success);
}
static ProcArg image_flip_inargs[] =
{
{
GIMP_PDB_IMAGE,
"image",
"The image"
},
{
GIMP_PDB_INT32,
"flip_type",
"Type of flip: GIMP_ORIENTATION_HORIZONTAL (0) or GIMP_ORIENTATION_VERTICAL (1)"
}
};
static ProcRecord image_flip_proc =
{
"gimp_image_flip",
"Flips the image horizontally or vertically.",
"This procedure flips (mirrors) the images.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
2,
image_flip_inargs,
0,
NULL,
{ { image_flip_invoker } }
};
static Argument *
image_free_shadow_invoker (Gimp *gimp,
Argument *args)
......
......@@ -68,7 +68,7 @@ void register_transform_tools_procs (Gimp *gimp);
void register_undo_procs (Gimp *gimp);
void register_unit_procs (Gimp *gimp);
/* 342 procedures registered total */
/* 343 procedures registered total */
void
internal_procs_init (Gimp *gimp,
......@@ -86,88 +86,88 @@ internal_procs_init (Gimp *gimp,
(* status_callback) (NULL, _("Channel"), 0.041);
register_channel_procs (gimp);
(* status_callback) (NULL, _("Color"), 0.088);
(* status_callback) (NULL, _("Color"), 0.087);
register_color_procs (gimp);
(* status_callback) (NULL, _("Convert"), 0.123);
(* status_callback) (NULL, _("Convert"), 0.122);
register_convert_procs (gimp);
(* status_callback) (NULL, _("Display procedures"), 0.132);
(* status_callback) (NULL, _("Display procedures"), 0.131);
register_display_procs (gimp);
(* status_callback) (NULL, _("Drawable procedures"), 0.143);
register_drawable_procs (gimp);
(* status_callback) (NULL, _("Edit procedures"), 0.211);
(* status_callback) (NULL, _("Edit procedures"), 0.21);
register_edit_procs (gimp);
(* status_callback) (NULL, _("File Operations"), 0.228);
(* status_callback) (NULL, _("File Operations"), 0.227);
register_fileops_procs (gimp);
(* status_callback) (NULL, _("Floating selections"), 0.251);
register_floating_sel_procs (gimp);
(* status_callback) (NULL, _("Font UI"), 0.269);
(* status_callback) (NULL, _("Font UI"), 0.268);
register_font_select_procs (gimp);
(* status_callback) (NULL, _("Gimprc procedures"), 0.278);
(* status_callback) (NULL, _("Gimprc procedures"), 0.277);
register_gimprc_procs (gimp);
(* status_callback) (NULL, _("Gradient UI"), 0.289);
register_gradient_select_procs (gimp);
(* status_callback) (NULL, _("Gradients"), 0.298);
(* status_callback) (NULL, _("Gradients"), 0.297);
register_gradients_procs (gimp);
(* status_callback) (NULL, _("Guide procedures"), 0.319);
(* status_callback) (NULL, _("Guide procedures"), 0.318);
register_guides_procs (gimp);
(* status_callback) (NULL, _("Help procedures"), 0.336);
(* status_callback) (NULL, _("Help procedures"), 0.335);
register_help_procs (gimp);
(* status_callback) (NULL, _("Image"), 0.339);
(* status_callback) (NULL, _("Image"), 0.338);
register_image_procs (gimp);
(* status_callback) (NULL, _("Layer"), 0.523);
(* status_callback) (NULL, _("Layer"), 0.525);
register_layer_procs (gimp);
(* status_callback) (NULL, _("Message procedures"), 0.617);
(* status_callback) (NULL, _("Message procedures"), 0.618);
register_message_procs (gimp);
(* status_callback) (NULL, _("Miscellaneous"), 0.626);
(* status_callback) (NULL, _("Miscellaneous"), 0.627);
register_misc_procs (gimp);
(* status_callback) (NULL, _("Misc Tool procedures"), 0.632);
(* status_callback) (NULL, _("Misc Tool procedures"), 0.633);
register_misc_tools_procs (gimp);
(* status_callback) (NULL, _("Paint Tool procedures"), 0.64);
(* status_callback) (NULL, _("Paint Tool procedures"), 0.641);
register_paint_tools_procs (gimp);
(* status_callback) (NULL, _("Palette"), 0.684);
(* status_callback) (NULL, _("Palette"), 0.685);
register_palette_procs (gimp);
(* status_callback) (NULL, _("Palette UI"), 0.702);
(* status_callback) (NULL, _("Palette UI"), 0.703);
register_palette_select_procs (gimp);
(* status_callback) (NULL, _("Palettes"), 0.711);
register_palettes_procs (gimp);
(* status_callback) (NULL, _("Parasite procedures"), 0.725);
(* status_callback) (NULL, _("Parasite procedures"), 0.726);
register_parasite_procs (gimp);
(* status_callback) (NULL, _("Paths"), 0.76);
(* status_callback) (NULL, _("Paths"), 0.761);
register_paths_procs (gimp);
(* status_callback) (NULL, _("Pattern UI"), 0.798);
(* status_callback) (NULL, _("Pattern UI"), 0.799);
register_pattern_select_procs (gimp);
(* status_callback) (NULL, _("Patterns"), 0.807);
(* status_callback) (NULL, _("Patterns"), 0.808);
register_patterns_procs (gimp);
(* status_callback) (NULL, _("Plug-in"), 0.822);
register_plug_in_procs (gimp);
(* status_callback) (NULL, _("Procedural database"), 0.839);
(* status_callback) (NULL, _("Procedural database"), 0.84);
register_procedural_db_procs (gimp);
(* status_callback) (NULL, _("Image mask"), 0.863);
......
......@@ -306,6 +306,38 @@ gimp_image_crop (gint32 image_ID,
return success;
}
/**
* gimp_image_flip:
* @image_ID: The image.
* @flip_type: Type of flip.
*
* Flips the image horizontally or vertically.
*
* This procedure flips (mirrors) the images.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_flip (gint32 image_ID,
GimpOrientationType flip_type)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_image_flip",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_INT32, flip_type,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_free_shadow:
* @image_ID: The image.
......
......@@ -29,131 +29,133 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
gint* gimp_image_list (gint *num_images);
gint32 gimp_image_new (gint width,
gint height,
GimpImageBaseType type);
gboolean gimp_image_delete (gint32 image_ID);
GimpImageBaseType gimp_image_base_type (gint32 image_ID);
gboolean gimp_image_resize (gint32 image_ID,
gint new_width,
gint new_height,
gint offx,
gint offy);
gboolean gimp_image_scale (gint32 image_ID,
gint new_width,
gint new_height);
gboolean gimp_image_crop (gint32 image_ID,
gint new_width,
gint new_height,
gint offx,
gint offy);
gboolean gimp_image_free_shadow (gint32 image_ID);
gint* gimp_image_get_layers (gint32 image_ID,
gint *num_layers);
gint* gimp_image_get_channels (gint32 image_ID,
gint *num_channels);
gint32 gimp_image_active_drawable (gint32 image_ID);
gboolean gimp_image_unset_active_channel (gint32 image_ID);
gint32 gimp_image_pick_correlate_layer (gint32 image_ID,
gint x,
gint y);
gboolean gimp_image_raise_layer (gint32 image_ID,
gint32 layer_ID);
gboolean gimp_image_lower_layer (gint32 image_ID,
gint32 layer_ID);
gboolean gimp_image_raise_layer_to_top (gint32 image_ID,
gint32 layer_ID);
gboolean gimp_image_lower_layer_to_bottom (gint32 image_ID,
gint32 layer_ID);
gint32 gimp_image_merge_visible_layers (gint32 image_ID,
GimpMergeType merge_type);
gint32 gimp_image_merge_down (gint32 image_ID,
gint32 merge_layer_ID,
GimpMergeType merge_type);
gint32 gimp_image_flatten (gint32 image_ID);
gboolean gimp_image_add_layer (gint32 image_ID,
gint32 layer_ID,
gint position);
gboolean gimp_image_remove_layer (gint32 image_ID,
gint32 layer_ID);
gboolean gimp_image_add_layer_mask (gint32 image_ID,
gint32 layer_ID,
gint32 mask_ID);
gboolean gimp_image_remove_layer_mask (gint32 image_ID,
gint32 layer_ID,