mirror of https://github.com/GNOME/gimp.git
tools/pdbgen/pdb/drawable.pdb corrected documentation for
2004-09-10 Sven Neumann <sven@gimp.org> * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/image.pdb: corrected documentation for _gimp_drawable_thumbnail() and _gimp_image_thumbnail(). * app/pdb/drawable_cmds.c * app/pdb/image_cmds.c * libgimp/gimpdrawable_pdb.c * libgimp/gimpimage_pdb.c: regenerated. * libgimp/gimpdrawablepreview.c (gimp_drawable_preview_draw_thumb): also handle GRAY and GRAYA thumbnails.
This commit is contained in:
parent
6a824465f5
commit
b6cc80e154
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
2004-09-10 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimp/gimpdrawablepreview.c (gimp_drawable_preview_draw_thumb):
|
||||
also handle GRAY and GRAYA thumbnails.
|
||||
|
||||
* tools/pdbgen/pdb/drawable.pdb
|
||||
* tools/pdbgen/pdb/image.pdb: corrected documentation for
|
||||
_gimp_drawable_thumbnail() and _gimp_image_thumbnail().
|
||||
|
||||
* app/pdb/drawable_cmds.c
|
||||
* app/pdb/image_cmds.c
|
||||
* libgimp/gimpdrawable_pdb.c
|
||||
* libgimp/gimpimage_pdb.c: regenerated.
|
||||
|
||||
2004-09-10 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpwidgets/gimppreview.c: fixed positioning of the
|
||||
|
|
|
@ -2163,7 +2163,7 @@ static ProcRecord drawable_thumbnail_proc =
|
|||
{
|
||||
"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 the RGB[A] format. The bpp return value gives the number of bytes in the image. The alpha channel is also returned if the drawable has one.",
|
||||
"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.",
|
||||
"Andy Thomas",
|
||||
"Andy Thomas",
|
||||
"1999",
|
||||
|
|
|
@ -2943,7 +2943,7 @@ static ProcRecord image_thumbnail_proc =
|
|||
{
|
||||
"gimp_image_thumbnail",
|
||||
"Get a thumbnail of an image.",
|
||||
"This function gets data from which a thumbnail of an image preview can be created. Maximum x or y dimension is 1024 pixels. The pixels are returned in the RGB[A] format. The bpp return value gives the number of bits per pixel in the image. If the image has an alpha channel, it is also returned.",
|
||||
"This function gets data from which a thumbnail of an image 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 bits per pixel in the image.",
|
||||
"Andy Thomas",
|
||||
"Andy Thomas",
|
||||
"1999",
|
||||
|
|
|
@ -1118,9 +1118,8 @@ gimp_drawable_offset (gint32 drawable_ID,
|
|||
*
|
||||
* 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 the RGB[A] format. The bpp return value gives the
|
||||
* number of bytes in the image. The alpha channel is also returned if
|
||||
* the drawable has one.
|
||||
* are returned in RGB[A] or GRAY[A] format. The bpp return value gives
|
||||
* the number of bytes in the image.
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
*/
|
||||
|
|
|
@ -180,25 +180,27 @@ gimp_drawable_preview_draw_thumb (GimpPreview *preview,
|
|||
|
||||
if (buffer)
|
||||
{
|
||||
GimpImageType type;
|
||||
|
||||
gtk_widget_set_size_request (GTK_WIDGET (area), width, height);
|
||||
gtk_widget_show (GTK_WIDGET (area));
|
||||
gtk_widget_realize (GTK_WIDGET (area));
|
||||
|
||||
switch (bpp)
|
||||
{
|
||||
case 3:
|
||||
gimp_preview_area_draw (area,
|
||||
0, 0, width, height,
|
||||
GIMP_RGB_IMAGE, buffer, 3 * width);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
gimp_preview_area_draw (area,
|
||||
0, 0, width, height,
|
||||
GIMP_RGBA_IMAGE, buffer, 4 * width);
|
||||
break;
|
||||
case 1: type = GIMP_GRAY_IMAGE; break;
|
||||
case 2: type = GIMP_GRAYA_IMAGE; break;
|
||||
case 3: type = GIMP_RGB_IMAGE; break;
|
||||
case 4: type = GIMP_RGBA_IMAGE; break;
|
||||
default:
|
||||
g_free (buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
gimp_preview_area_draw (area,
|
||||
0, 0, width, height,
|
||||
type, buffer, bpp * width);
|
||||
|
||||
g_free (buffer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1466,9 +1466,8 @@ gimp_image_is_dirty (gint32 image_ID)
|
|||
*
|
||||
* This function gets data from which a thumbnail of an image preview
|
||||
* can be created. Maximum x or y dimension is 1024 pixels. The pixels
|
||||
* are returned in the RGB[A] format. The bpp return value gives the
|
||||
* number of bits per pixel in the image. If the image has an alpha
|
||||
* channel, it is also returned.
|
||||
* are returned in RGB[A] or GRAY[A] format. The bpp return value gives
|
||||
* the number of bits per pixel in the image.
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
*/
|
||||
|
|
|
@ -564,10 +564,10 @@ sub drawable_thumbnail {
|
|||
$blurb = 'Get a thumbnail of a drawable.';
|
||||
|
||||
$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 returned
|
||||
in the RGB[A] format. The bpp return value gives the number of bytes in
|
||||
the image. The alpha channel is also returned if the drawable has one.
|
||||
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.
|
||||
HELP
|
||||
|
||||
$author = $copyright = 'Andy Thomas';
|
||||
|
|
|
@ -1443,10 +1443,10 @@ sub image_thumbnail {
|
|||
$blurb = 'Get a thumbnail of an image.';
|
||||
|
||||
$help = <<'HELP';
|
||||
This function gets data from which a thumbnail of an image preview can be
|
||||
created. Maximum x or y dimension is 1024 pixels. The pixels are returned in
|
||||
the RGB[A] format. The bpp return value gives the number of bits per pixel
|
||||
in the image. If the image has an alpha channel, it is also returned.
|
||||
This function gets data from which a thumbnail of an image 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 bits per pixel in the image.
|
||||
HELP
|
||||
|
||||
$author = $copyright = 'Andy Thomas';
|
||||
|
|
Loading…
Reference in New Issue