Commit c2869520 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

tools/pdbgen/pdb/layer.pdb added new scale procedures that allow to

2008-09-24  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/image.pdb: added new scale procedures that
	allow to specify the interpolation explicitly. Fixes bug 
#486977.
	Also pass the progress parameter to the scale and rotate 
functions.

	* app/pdb/image-cmds.c
	* app/pdb/internal-procs.c
	* app/pdb/layer-cmds.c
	* libgimp/gimpimage_pdb.[ch]
	* libgimp/gimplayer_pdb.[ch]: regenerated.

	* libgimp/gimp.def: updated.


svn path=/trunk/; revision=27039
parent c0140827
2008-09-24 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/image.pdb: added new scale procedures that
allow to specify the interpolation explicitly. Fixes bug #486977.
Also pass the progress parameter to the scale and rotate functions.
* app/pdb/image-cmds.c
* app/pdb/internal-procs.c
* app/pdb/layer-cmds.c
* libgimp/gimpimage_pdb.[ch]
* libgimp/gimplayer_pdb.[ch]: regenerated.
* libgimp/gimp.def: updated.
2008-09-24 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/image.pdb: fixed error and some typos in the
......
......@@ -48,6 +48,7 @@
#include "core/gimplist.h"
#include "core/gimpparamspecs.h"
#include "core/gimppickable.h"
#include "core/gimpprogress.h"
#include "core/gimpselection.h"
#include "core/gimpunit.h"
#include "vectors/gimpvectors.h"
......@@ -400,9 +401,49 @@ image_scale_invoker (GimpProcedure *procedure,
if (success)
{
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_image_scale (image, new_width, new_height,
gimp->config->interpolation_type,
NULL);
progress);
if (progress)
gimp_progress_end (progress);
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GValueArray *
image_scale_full_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpImage *image;
gint32 new_width;
gint32 new_height;
gint32 interpolation;
image = gimp_value_get_image (&args->values[0], gimp);
new_width = g_value_get_int (&args->values[1]);
new_height = g_value_get_int (&args->values[2]);
interpolation = g_value_get_enum (&args->values[3]);
if (success)
{
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_image_scale (image, new_width, new_height, interpolation, progress);
if (progress)
gimp_progress_end (progress);
}
return gimp_procedure_get_return_values (procedure, success,
......@@ -488,7 +529,13 @@ image_rotate_invoker (GimpProcedure *procedure,
if (success)
{
gimp_image_rotate (image, context, rotate_type, NULL);
if (progress)
gimp_progress_start (progress, _("Rotating"), FALSE);
gimp_image_rotate (image, context, rotate_type, progress);
if (progress)
gimp_progress_end (progress);
}
return gimp_procedure_get_return_values (procedure, success,
......@@ -2776,8 +2823,8 @@ register_image_procs (GimpPDB *pdb)
"gimp-image-scale");
gimp_procedure_set_static_strings (procedure,
"gimp-image-scale",
"Scale the image to the specified extents.",
"This procedure scales the image so that its new width and height are equal to the supplied parameters. Offsets are also provided which describe the position of the previous image's content. All channels within the image are scaled according to the specified parameters; this includes the image selection mask. All layers within the image are repositioned according to the specified offsets.",
"Scale the image using the default interpolation method.",
"This procedure scales the image so that its new width and height are equal to the supplied parameters. All layers and channels within the image are scaled according to the specified parameters; this includes the image selection mask. The default interpolation method is used.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
......@@ -2803,6 +2850,48 @@ register_image_procs (GimpPDB *pdb)
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-image-scale-full
*/
procedure = gimp_procedure_new (image_scale_full_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-image-scale-full");
gimp_procedure_set_static_strings (procedure,
"gimp-image-scale-full",
"Scale the image using a specific interpolation method.",
"This procedure scales the image so that its new width and height are equal to the supplied parameters. All layers and channels within the image are scaled according to the specified parameters; this includes the image selection mask. This procedure allows you to specify the interpolation method explicitly.",
"Sven Neumann <sven@gimp.org>",
"Sven Neumann",
"2008",
NULL);
gimp_procedure_add_argument (procedure,
gimp_param_spec_image_id ("image",
"image",
"The image",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("new-width",
"new width",
"New image width",
1, GIMP_MAX_IMAGE_SIZE, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("new-height",
"new height",
"New image height",
1, GIMP_MAX_IMAGE_SIZE, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("interpolation",
"interpolation",
"Type of interpolation",
GIMP_TYPE_INTERPOLATION_TYPE,
GIMP_INTERPOLATION_NONE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-image-crop
*/
......@@ -2838,13 +2927,13 @@ register_image_procs (GimpPDB *pdb)
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("offx",
"offx",
"x offset: (0 <= offx <= (width - new_width))",
"X offset: (0 <= offx <= (width - new_width))",
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("offy",
"offy",
"y offset: (0 <= offy <= (height - new_height))",
"Y offset: (0 <= offy <= (height - new_height))",
0, G_MAXINT32, 0,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
......
......@@ -29,7 +29,7 @@
#include "internal-procs.h"
/* 591 procedures registered total */
/* 593 procedures registered total */
void
internal_procs_init (GimpPDB *pdb)
......
......@@ -35,6 +35,7 @@
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
#include "core/gimpparamspecs.h"
#include "core/gimpprogress.h"
#include "core/gimpprojection.h"
#include "gimppdb.h"
......@@ -283,11 +284,66 @@ layer_scale_invoker (GimpProcedure *procedure,
if (success)
{
if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), error))
gimp_item_scale_by_origin (GIMP_ITEM (layer), new_width, new_height,
gimp->config->interpolation_type, NULL,
local_origin);
{
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_item_scale_by_origin (GIMP_ITEM (layer), new_width, new_height,
gimp->config->interpolation_type, progress,
local_origin);
if (progress)
gimp_progress_end (progress);
}
else
success = FALSE;
{
success = FALSE;
}
}
return gimp_procedure_get_return_values (procedure, success,
error ? *error : NULL);
}
static GValueArray *
layer_scale_full_invoker (GimpProcedure *procedure,
Gimp *gimp,
GimpContext *context,
GimpProgress *progress,
const GValueArray *args,
GError **error)
{
gboolean success = TRUE;
GimpLayer *layer;
gint32 new_width;
gint32 new_height;
gboolean local_origin;
gint32 interpolation;
layer = gimp_value_get_layer (&args->values[0], gimp);
new_width = g_value_get_int (&args->values[1]);
new_height = g_value_get_int (&args->values[2]);
local_origin = g_value_get_boolean (&args->values[3]);
interpolation = g_value_get_enum (&args->values[4]);
if (success)
{
if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), error))
{
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_item_scale_by_origin (GIMP_ITEM (layer), new_width, new_height,
interpolation, progress,
local_origin);
if (progress)
gimp_progress_end (progress);
}
else
{
success = FALSE;
}
}
return gimp_procedure_get_return_values (procedure, success,
......@@ -1194,8 +1250,8 @@ register_layer_procs (GimpPDB *pdb)
"gimp-layer-scale");
gimp_procedure_set_static_strings (procedure,
"gimp-layer-scale",
"Scale the layer to the specified extents.",
"This procedure scales the layer so that its new width and height are equal to the supplied parameters. The 'local-origin' parameter specifies whether to scale from the center of the layer, or from the image origin. This operation only works if the layer has been added to an image.",
"Scale the layer using the default interpolation method.",
"This procedure scales the layer so that its new width and height are equal to the supplied parameters. The 'local-origin' parameter specifies whether to scale from the center of the layer, or from the image origin. This operation only works if the layer has been added to an image. The default interpolation method is used for scaling.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
......@@ -1227,6 +1283,54 @@ register_layer_procs (GimpPDB *pdb)
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-layer-scale-full
*/
procedure = gimp_procedure_new (layer_scale_full_invoker);
gimp_object_set_static_name (GIMP_OBJECT (procedure),
"gimp-layer-scale-full");
gimp_procedure_set_static_strings (procedure,
"gimp-layer-scale-full",
"Scale the layer using a specific interpolation method.",
"This procedure scales the layer so that its new width and height are equal to the supplied parameters. The 'local-origin' parameter specifies whether to scale from the center of the layer, or from the image origin. This operation only works if the layer has been added to an image. This procedure allows you to specify the interpolation method explicitly.",
"Sven Neumann <sven@gimp.org>",
"Sven Neumann",
"2008",
NULL);
gimp_procedure_add_argument (procedure,
gimp_param_spec_layer_id ("layer",
"layer",
"The layer",
pdb->gimp, FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("new-width",
"new width",
"New layer width",
1, GIMP_MAX_IMAGE_SIZE, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("new-height",
"new height",
"New layer height",
1, GIMP_MAX_IMAGE_SIZE, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_boolean ("local-origin",
"local origin",
"Use a local origin (as opposed to the image origin)",
FALSE,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
g_param_spec_enum ("interpolation",
"interpolation",
"Type of interpolation",
GIMP_TYPE_INTERPOLATION_TYPE,
GIMP_INTERPOLATION_NONE,
GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure);
/*
* gimp-layer-resize
*/
......
......@@ -382,6 +382,7 @@ EXPORTS
gimp_image_resize_to_layers
gimp_image_rotate
gimp_image_scale
gimp_image_scale_full
gimp_image_set_active_channel
gimp_image_set_active_layer
gimp_image_set_active_vectors
......@@ -429,6 +430,7 @@ EXPORTS
gimp_layer_resize
gimp_layer_resize_to_image_size
gimp_layer_scale
gimp_layer_scale_full
gimp_layer_set_apply_mask
gimp_layer_set_edit_mask
gimp_layer_set_lock_alpha
......
......@@ -414,14 +414,13 @@ gimp_image_resize_to_layers (gint32 image_ID)
* @new_width: New image width.
* @new_height: New image height.
*
* Scale the image to the specified extents.
* Scale the image using the default interpolation method.
*
* This procedure scales the image so that its new width and height are
* equal to the supplied parameters. Offsets are also provided which
* describe the position of the previous image's content. All channels
* within the image are scaled according to the specified parameters;
* this includes the image selection mask. All layers within the image
* are repositioned according to the specified offsets.
* equal to the supplied parameters. All layers and channels within the
* image are scaled according to the specified parameters; this
* includes the image selection mask. The default interpolation method
* is used.
*
* Returns: TRUE on success.
*/
......@@ -448,13 +447,57 @@ gimp_image_scale (gint32 image_ID,
return success;
}
/**
* gimp_image_scale_full:
* @image_ID: The image.
* @new_width: New image width.
* @new_height: New image height.
* @interpolation: Type of interpolation.
*
* Scale the image using a specific interpolation method.
*
* This procedure scales the image so that its new width and height are
* equal to the supplied parameters. All layers and channels within the
* image are scaled according to the specified parameters; this
* includes the image selection mask. This procedure allows you to
* specify the interpolation method explicitly.
*
* Returns: TRUE on success.
*
* Since: GIMP 2.6
*/
gboolean
gimp_image_scale_full (gint32 image_ID,
gint new_width,
gint new_height,
GimpInterpolationType interpolation)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-image-scale-full",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_INT32, new_width,
GIMP_PDB_INT32, new_height,
GIMP_PDB_INT32, interpolation,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_crop:
* @image_ID: The image.
* @new_width: New image width: (0 < new_width <= width).
* @new_height: New image height: (0 < new_height <= height).
* @offx: x offset: (0 <= offx <= (width - new_width)).
* @offy: y offset: (0 <= offy <= (height - new_height)).
* @offx: X offset: (0 <= offx <= (width - new_width)).
* @offy: Y offset: (0 <= offy <= (height - new_height)).
*
* Crop the image to the specified extents.
*
......
This diff is collapsed.
......@@ -269,13 +269,13 @@ gimp_layer_flatten (gint32 layer_ID)
* @new_height: New layer height.
* @local_origin: Use a local origin (as opposed to the image origin).
*
* Scale the layer to the specified extents.
* Scale the layer using the default interpolation method.
*
* This procedure scales the layer so that its new width and height are
* equal to the supplied parameters. The 'local-origin' parameter
* specifies whether to scale from the center of the layer, or from the
* image origin. This operation only works if the layer has been added
* to an image.
* to an image. The default interpolation method is used for scaling.
*
* Returns: TRUE on success.
*/
......@@ -304,6 +304,54 @@ gimp_layer_scale (gint32 layer_ID,
return success;
}
/**
* gimp_layer_scale_full:
* @layer_ID: The layer.
* @new_width: New layer width.
* @new_height: New layer height.
* @local_origin: Use a local origin (as opposed to the image origin).
* @interpolation: Type of interpolation.
*
* Scale the layer using a specific interpolation method.
*
* This procedure scales the layer so that its new width and height are
* equal to the supplied parameters. The 'local-origin' parameter
* specifies whether to scale from the center of the layer, or from the
* image origin. This operation only works if the layer has been added
* to an image. This procedure allows you to specify the interpolation
* method explicitly.
*
* Returns: TRUE on success.
*
* Since: GIMP 2.6
*/
gboolean
gimp_layer_scale_full (gint32 layer_ID,
gint new_width,
gint new_height,
gboolean local_origin,
GimpInterpolationType interpolation)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp-layer-scale-full",
&nreturn_vals,
GIMP_PDB_LAYER, layer_ID,
GIMP_PDB_INT32, new_width,
GIMP_PDB_INT32, new_height,
GIMP_PDB_INT32, local_origin,
GIMP_PDB_INT32, interpolation,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_layer_resize:
* @layer_ID: The layer.
......
......@@ -29,65 +29,70 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
G_GNUC_INTERNAL gint32 _gimp_layer_new (gint32 image_ID,
gint width,
gint height,
GimpImageType type,
const gchar *name,
gdouble opacity,
GimpLayerModeEffects mode);
gint32 gimp_layer_new_from_visible (gint32 image_ID,
gint32 dest_image_ID,
const gchar *name);
gint32 gimp_layer_new_from_drawable (gint32 drawable_ID,
gint32 dest_image_ID);
G_GNUC_INTERNAL gint32 _gimp_layer_copy (gint32 layer_ID,
gboolean add_alpha);
gboolean gimp_layer_add_alpha (gint32 layer_ID);
gboolean gimp_layer_flatten (gint32 layer_ID);
gboolean gimp_layer_scale (gint32 layer_ID,
gint new_width,
gint new_height,
gboolean local_origin);
gboolean gimp_layer_resize (gint32 layer_ID,
gint new_width,
gint new_height,
gint offx,
gint offy);
gboolean gimp_layer_resize_to_image_size (gint32 layer_ID);
gboolean gimp_layer_translate (gint32 layer_ID,
gint offx,
gint offy);
gboolean gimp_layer_set_offsets (gint32 layer_ID,
gint offx,
gint offy);
gint32 gimp_layer_create_mask (gint32 layer_ID,
GimpAddMaskType mask_type);
gint32 gimp_layer_get_mask (gint32 layer_ID);
gint32 gimp_layer_from_mask (gint32 mask_ID);
gboolean gimp_layer_add_mask (gint32 layer_ID,
gint32 mask_ID);
gboolean gimp_layer_remove_mask (gint32 layer_ID,
GimpMaskApplyMode mode);
gboolean gimp_layer_is_floating_sel (gint32 layer_ID);
gboolean gimp_layer_get_lock_alpha (gint32 layer_ID);
gboolean gimp_layer_set_lock_alpha (gint32 layer_ID,
gboolean lock_alpha);
gboolean gimp_layer_get_apply_mask (gint32 layer_ID);
gboolean gimp_layer_set_apply_mask (gint32 layer_ID,
gboolean apply_mask);
gboolean gimp_layer_get_show_mask (gint32 layer_ID);
gboolean gimp_layer_set_show_mask (gint32 layer_ID,
gboolean show_mask);
gboolean gimp_layer_get_edit_mask (gint32 layer_ID);
gboolean gimp_layer_set_edit_mask (gint32 layer_ID,
gboolean edit_mask);
gdouble gimp_layer_get_opacity (gint32 layer_ID);
gboolean gimp_layer_set_opacity (gint32 layer_ID,
gdouble opacity);
GimpLayerModeEffects gimp_layer_get_mode (gint32 layer_ID);
gboolean gimp_layer_set_mode (gint32 layer_ID,
GimpLayerModeEffects mode);
G_GNUC_INTERNAL gint32 _gimp_layer_new (gint32 image_ID,
gint width,
gint height,
GimpImageType type,
const gchar *name,
gdouble opacity,
GimpLayerModeEffects mode);
gint32 gimp_layer_new_from_visible (gint32 image_ID,
gint32 dest_image_ID,
const gchar *name);
gint32 gimp_layer_new_from_drawable (gint32 drawable_ID,
gint32 dest_image_ID);
G_GNUC_INTERNAL gint32 _gimp_layer_copy (gint32 layer_ID,
gboolean add_alpha);
gboolean gimp_layer_add_alpha (gint32 layer_ID);
gboolean gimp_layer_flatten (gint32 layer_ID);
gboolean gimp_layer_scale (gint32 layer_ID,
gint new_width,
gint new_height,
gboolean local_origin);
gboolean gimp_layer_scale_full (gint32 layer_ID,
gint new_width,
gint new_height,
gboolean local_origin,
GimpInterpolationType interpolation);
gboolean gimp_layer_resize (gint32 layer_ID,
gint new_width,
gint new_height,
gint offx,
gint offy);
gboolean gimp_layer_resize_to_image_size (gint32 layer_ID);
gboolean gimp_layer_translate (gint32 layer_ID,
gint offx,
gint offy);
gboolean gimp_layer_set_offsets (gint32 layer_ID,
gint offx,
gint offy);
gint32 gimp_layer_create_mask (gint32 layer_ID,
GimpAddMaskType mask_type);
gint32 gimp_layer_get_mask (gint32 layer_ID);
gint32 gimp_layer_from_mask (gint32 mask_ID);
gboolean gimp_layer_add_mask (gint32 layer_ID,
gint32 mask_ID);
gboolean gimp_layer_remove_mask (gint32 layer_ID,
GimpMaskApplyMode mode);
gboolean gimp_layer_is_floating_sel (gint32 layer_ID);
gboolean gimp_layer_get_lock_alpha (gint32 layer_ID);
gboolean gimp_layer_set_lock_alpha (gint32 layer_ID,
gboolean lock_alpha);
gboolean gimp_layer_get_apply_mask (gint32 layer_ID);
gboolean gimp_layer_set_apply_mask (gint32 layer_ID,
gboolean apply_mask);
gboolean gimp_layer_get_show_mask (gint32 layer_ID);
gboolean gimp_layer_set_show_mask (gint32 layer_ID,
gboolean show_mask);
gboolean gimp_layer_get_edit_mask (gint32 layer_ID);
gboolean gimp_layer_set_edit_mask (gint32 layer_ID,
gboolean edit_mask);
gdouble gimp_layer_get_opacity (gint32 layer_ID);
gboolean gimp_layer_set_opacity (gint32 layer_ID,
gdouble opacity);
GimpLayerModeEffects gimp_layer_get_mode (gint32 layer_ID);
gboolean gimp_layer_set_mode (gint32 layer_ID,
GimpLayerModeEffects mode);
G_END_DECLS
......
......@@ -255,15 +255,14 @@ CODE
}
sub image_scale {
$blurb = 'Scale the image to the specified extents.';
$blurb = 'Scale the image using the default interpolation method.';
$help = <<'HELP';
This procedure scales the image so that its new width and height are
equal to the supplied parameters. Offsets are also provided which
describe the position of the previous image's content. All channels
within the image are scaled according to the specified parameters;
this includes the image selection mask. All layers within the image
are repositioned according to the specified offsets.
equal to the supplied parameters. All layers and channels within the
image are scaled according to the specified parameters; this includes
the image selection mask. The default interpolation method is used.
HELP
&std_pdb_misc;
......@@ -281,9 +280,55 @@ HELP
headers => [ qw("config/gimpcoreconfig.h" "core/gimpimage-scale.h") ],
code => <<'CODE'
{
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_image_scale (image, new_width, new_height,
gimp->config->interpolation_type,
NULL);
progress);
if (progress)
gimp_progress_end (progress);
}
CODE
);
}
sub image_scale_full {
$blurb = 'Scale the image using a specific interpolation method.';
$help = <<'HELP';
This procedure scales the image so that its new width and height are
equal to the supplied parameters. All layers and channels within the
image are scaled according to the specified parameters; this includes
the image selection mask. This procedure allows you to specify the
interpolation method explicitly.
HELP
&neo_pdb_misc('2008', '2.6');
@inargs = (
{ name => 'image', type => 'image',
desc => 'The image' },
{ name => 'new_width', type => '1 <= int32 <= GIMP_MAX_IMAGE_SIZE',
desc => 'New image width' },
{ name => 'new_height', type => '1 <= int32 <= GIMP_MAX_IMAGE_SIZE',
desc => 'New image height' },
{ name => 'interpolation', type => 'enum GimpInterpolationType',
desc => 'Type of interpolation' }
);
%invoke = (
headers => [ qw("config/gimpcoreconfig.h" "core/gimpimage-scale.h") ],
code => <<'CODE'
{
if (progress)
gimp_progress_start (progress, _("Scaling"), FALSE);
gimp_image_scale (image, new_width, new_height, interpolation, progress);
if (progress)
gimp_progress_end (progress);
}
CODE
);
......@@ -311,9 +356,9 @@ HELP
{ name => 'new_height', type => '1 <= int32 <= GIMP_MAX_IMAGE_SIZE',
desc => 'New image height: (0 < new_height <= height)' },
{ name => 'offx', type => '0 <= int32',
desc => 'x offset: (0 <= offx <= (width - new_width))' },
desc => 'X offset: (0 <= offx <= (width - new_width))' },
{ name => 'offy', type => '0 <= int32',
desc => 'y offset: (0 <= offy <= (height - new_height))' }
desc => 'Y offset: (0 <= offy <= (height - new_height))' }
);
%invoke = (
......@@ -378,7 +423,13 @@ sub image_rotate {
headers => [ qw("core/gimpimage-rotate.h") ],
code => <<'CODE'
{
gimp_image_rotate (image, context, rotate_type, NULL);
if (progress)
gimp_progress_start (progress, _("Rotating"), FALSE);
gimp_image_rotate (image, context, rotate_type, progress);
if (progress)
gimp_progress_end (progress);
}
CODE
);
......@@ -2570,6 +2621,7 @@ CODE
"base/temp-buf.h"
"core/gimp.h"
"core/gimplist.h"
"core/gimpprogress.h"
"core/gimpunit.h"
"gimppdberror.h"
"gimppdb-utils.h"
......@@ -2582,7 +2634,7 @@ CODE
image_width image_height
image_free_shadow
image_resize image_resize_to_layers
image_scale
image_scale image_scale_full
image_crop image_flip image_rotate
image_get_layers
image_get_channels
......@@ -2624,7 +2676,7 @@ CODE
image_get_channel_by_tattoo
image_get_vectors_by_tattoo);
%exports = (app => [@procs], lib => [@procs[0..45,48..75]]);
%exports = (app => [@procs], lib => [@procs[0..46,49..76]]);
$desc = 'Image';
......