changed limits in gimp_drawable_thumbnail()in gimp_drawable_sub_thumbnail

2006-08-08  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/drawable.pdb: changed limits in
	gimp_drawable_thumbnail()in gimp_drawable_sub_thumbnail to 1024
	(GIMP_VIEWABLE_MAX_PREVIEW_SIZE) and added an assertion like the
	one we have in image.pdb.

	* app/pdb/drawable_cmds.c
	* libgimp/gimpdrawable_pdb.c: regenerated.

	* libgimp/gimppixbuf.c: increased the limit to 1024 here as
well.
This commit is contained in:
Sven Neumann 2006-08-08 14:45:40 +00:00 committed by Sven Neumann
parent 44594ae2e0
commit a5f3a42b11
5 changed files with 42 additions and 26 deletions

View File

@ -1,3 +1,15 @@
2006-08-08 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/drawable.pdb: changed limits in
gimp_drawable_thumbnail()in gimp_drawable_sub_thumbnail to 1024
(GIMP_VIEWABLE_MAX_PREVIEW_SIZE) and added an assertion like the
one we have in image.pdb.
* app/pdb/drawable_cmds.c
* libgimp/gimpdrawable_pdb.c: regenerated.
* libgimp/gimppixbuf.c: increased the limit to 1024 here as well.
2006-08-08 Sven Neumann <sven@gimp.org>
* libgimpconfig/gimpconfig-deserialize.c

View File

@ -999,6 +999,8 @@ drawable_thumbnail_invoker (GimpProcedure *procedure,
TempBuf *buf;
gint dwidth, dheight;
g_assert (GIMP_VIEWABLE_MAX_PREVIEW_SIZE >= 1024);
/* Adjust the width/height ratio */
dwidth = gimp_item_width (GIMP_ITEM (drawable));
dheight = gimp_item_height (GIMP_ITEM (drawable));
@ -2193,7 +2195,7 @@ register_drawable_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-drawable-thumbnail",
"Get a thumbnail of a drawable.",
"This function gets data from which a thumbnail of a drawable preview can be created. Maximum x or y dimension is 512 pixels. The pixels are returned in RGB[A] or GRAY[A] format. The bpp return value gives the number of bytes in the image.",
"This function gets data from which a thumbnail of a drawable preview can be created. Maximum x or y dimension is 1024 pixels. The pixels are returned in RGB[A] or GRAY[A] format. The bpp return value gives the number of bytes in the image.",
"Andy Thomas",
"Andy Thomas",
"1999",
@ -2208,13 +2210,13 @@ register_drawable_procs (GimpPDB *pdb)
gimp_param_spec_int32 ("width",
"width",
"The requested thumbnail width",
1, 512, 1,
1, 1024, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("height",
"height",
"The requested thumbnail height",
1, 512, 1,
1, 1024, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("actual-width",
@ -2256,7 +2258,7 @@ register_drawable_procs (GimpPDB *pdb)
gimp_procedure_set_static_strings (procedure,
"gimp-drawable-sub-thumbnail",
"Get a thumbnail of a sub-area of a drawable drawable.",
"This function gets data from which a thumbnail of a drawable preview can be created. Maximum x or y dimension is 512 pixels. The pixels are returned in RGB[A] or GRAY[A] format. The bpp return value gives the number of bytes in the image.",
"This function gets data from which a thumbnail of a drawable preview can be created. Maximum x or y dimension is 1024 pixels. The pixels are returned in RGB[A] or GRAY[A] format. The bpp return value gives the number of bytes in the image.",
"Michael Natterer <mitch@gimp.org>",
"Michael Natterer",
"2004",
@ -2295,13 +2297,13 @@ register_drawable_procs (GimpPDB *pdb)
gimp_param_spec_int32 ("dest-width",
"dest width",
"The thumbnail width",
1, 512, 1,
1, 1024, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure,
gimp_param_spec_int32 ("dest-height",
"dest height",
"The thumbnail height",
1, 512, 1,
1, 1024, 1,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_int32 ("width",

View File

@ -1169,7 +1169,7 @@ gimp_drawable_offset (gint32 drawable_ID,
* Get a thumbnail of a drawable.
*
* This function gets data from which a thumbnail of a drawable preview
* can be created. Maximum x or y dimension is 512 pixels. The pixels
* can be created. Maximum x or y dimension is 1024 pixels. The pixels
* are returned in RGB[A] or GRAY[A] format. The bpp return value gives
* the number of bytes in the image.
*
@ -1239,7 +1239,7 @@ _gimp_drawable_thumbnail (gint32 drawable_ID,
* Get a thumbnail of a sub-area of a drawable drawable.
*
* This function gets data from which a thumbnail of a drawable preview
* can be created. Maximum x or y dimension is 512 pixels. The pixels
* can be created. Maximum x or y dimension is 1024 pixels. The pixels
* are returned in RGB[A] or GRAY[A] format. The bpp return value gives
* the number of bytes in the image.
*

View File

@ -39,8 +39,8 @@ static GdkPixbuf * gimp_pixbuf_from_data (guchar *data,
/**
* gimp_image_get_thumbnail:
* @image_ID: the image ID
* @width: the requested thumbnail width (<= 512 pixels)
* @height: the requested thumbnail height (<= 512 pixels)
* @width: the requested thumbnail width (<= 1024 pixels)
* @height: the requested thumbnail height (<= 1024 pixels)
* @alpha: how to handle an alpha channel
*
* Retrieves a thumbnail pixbuf for the image identified by @image_ID.
@ -61,8 +61,8 @@ gimp_image_get_thumbnail (gint32 image_ID,
gint thumb_bpp;
guchar *data;
g_return_val_if_fail (width > 0 && width <= 512, NULL);
g_return_val_if_fail (height > 0 && height <= 512, NULL);
g_return_val_if_fail (width > 0 && width <= 1024, NULL);
g_return_val_if_fail (height > 0 && height <= 1024, NULL);
data = gimp_image_get_thumbnail_data (image_ID,
&thumb_width,
@ -79,8 +79,8 @@ gimp_image_get_thumbnail (gint32 image_ID,
/**
* gimp_drawable_get_thumbnail:
* @drawable_ID: the drawable ID
* @width: the requested thumbnail width (<= 512 pixels)
* @height: the requested thumbnail height (<= 512 pixels)
* @width: the requested thumbnail width (<= 1024 pixels)
* @height: the requested thumbnail height (<= 1024 pixels)
* @alpha: how to handle an alpha channel
*
* Retrieves a thumbnail pixbuf for the drawable identified by
@ -102,8 +102,8 @@ gimp_drawable_get_thumbnail (gint32 drawable_ID,
gint thumb_bpp;
guchar *data;
g_return_val_if_fail (width > 0 && width <= 512, NULL);
g_return_val_if_fail (height > 0 && height <= 512, NULL);
g_return_val_if_fail (width > 0 && width <= 1024, NULL);
g_return_val_if_fail (height > 0 && height <= 1024, NULL);
data = gimp_drawable_get_thumbnail_data (drawable_ID,
&thumb_width,
@ -125,8 +125,8 @@ gimp_drawable_get_thumbnail (gint32 drawable_ID,
* @src_y: the y coordinate of the area
* @src_width: the width of the area
* @src_height: the height of the area
* @dest_width: the requested thumbnail width (<= 512 pixels)
* @dest_height: the requested thumbnail height (<= 512 pixels)
* @dest_width: the requested thumbnail width (<= 1024 pixels)
* @dest_height: the requested thumbnail height (<= 1024 pixels)
* @alpha: how to handle an alpha channel
*
* Retrieves a thumbnail pixbuf for the drawable identified by
@ -156,8 +156,8 @@ gimp_drawable_get_sub_thumbnail (gint32 drawable_ID,
g_return_val_if_fail (src_y >= 0, NULL);
g_return_val_if_fail (src_width > 0, NULL);
g_return_val_if_fail (src_height > 0, NULL);
g_return_val_if_fail (dest_width > 0 && dest_width <= 512, NULL);
g_return_val_if_fail (dest_height > 0 && dest_height <= 512, NULL);
g_return_val_if_fail (dest_width > 0 && dest_width <= 1024, NULL);
g_return_val_if_fail (dest_height > 0 && dest_height <= 1024, NULL);
data = gimp_drawable_get_sub_thumbnail_data (drawable_ID,
src_x, src_y,

View File

@ -973,7 +973,7 @@ sub drawable_thumbnail {
$help = <<'HELP';
This function gets data from which a thumbnail of a drawable preview
can be created. Maximum x or y dimension is 512 pixels. The pixels are
can be created. Maximum x or y dimension is 1024 pixels. The pixels are
returned in RGB[A] or GRAY[A] format. The bpp return value gives the
number of bytes in the image.
HELP
@ -983,9 +983,9 @@ HELP
@inargs = (
{ name => 'drawable', type => 'drawable',
desc => 'The drawable' },
{ name => 'width', type => '1 <= int32 <= 512',
{ name => 'width', type => '1 <= int32 <= 1024',
desc => 'The requested thumbnail width' },
{ name => 'height', type => '1 <= int32 <= 512',
{ name => 'height', type => '1 <= int32 <= 1024',
desc => 'The requested thumbnail height' }
);
@ -1009,6 +1009,8 @@ HELP
TempBuf *buf;
gint dwidth, dheight;
g_assert (GIMP_VIEWABLE_MAX_PREVIEW_SIZE >= 1024);
/* Adjust the width/height ratio */
dwidth = gimp_item_width (GIMP_ITEM (drawable));
dheight = gimp_item_height (GIMP_ITEM (drawable));
@ -1050,7 +1052,7 @@ sub drawable_sub_thumbnail {
$help = <<'HELP';
This function gets data from which a thumbnail of a drawable preview
can be created. Maximum x or y dimension is 512 pixels. The pixels are
can be created. Maximum x or y dimension is 1024 pixels. The pixels are
returned in RGB[A] or GRAY[A] format. The bpp return value gives the
number of bytes in the image.
HELP
@ -1068,9 +1070,9 @@ HELP
desc => 'The width of the area' },
{ name => 'src_height', type => '1 <= int32',
desc => 'The height of the area' },
{ name => 'dest_width', type => '1 <= int32 <= 512',
{ name => 'dest_width', type => '1 <= int32 <= 1024',
desc => 'The thumbnail width' },
{ name => 'dest_height', type => '1 <= int32 <= 512',
{ name => 'dest_height', type => '1 <= int32 <= 1024',
desc => 'The thumbnail height' }
);