gimp r27609 - in trunk: . plug-ins/common
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27609 - in trunk: . plug-ins/common
- Date: Mon, 10 Nov 2008 23:04:52 +0000 (UTC)
Author: neo
Date: Mon Nov 10 23:04:52 2008
New Revision: 27609
URL: http://svn.gnome.org/viewvc/gimp?rev=27609&view=rev
Log:
2008-11-11 Sven Neumann <sven gimp org>
* plug-ins/common/file-gif-load.c: return image size from the
"file-gif-load-thumb" procedure.
Modified:
trunk/ChangeLog
trunk/plug-ins/common/file-gif-load.c
Modified: trunk/plug-ins/common/file-gif-load.c
==============================================================================
--- trunk/plug-ins/common/file-gif-load.c (original)
+++ trunk/plug-ins/common/file-gif-load.c Mon Nov 10 23:04:52 2008
@@ -132,6 +132,12 @@
{ GIMP_PDB_STRING, "filename", "The name of the file to load" },
{ GIMP_PDB_INT32, "thumb-size", "Preferred thumbnail size" }
};
+ static const GimpParamDef thumb_return_vals[] =
+ {
+ { GIMP_PDB_IMAGE, "image", "Output image" },
+ { GIMP_PDB_INT32, "image-width", "Width of full-sized image" },
+ { GIMP_PDB_INT32, "image-height", "Height of full-sized image" }
+ };
gimp_install_procedure (LOAD_PROC,
"Loads files of Compuserve GIF file format",
@@ -163,8 +169,8 @@
NULL,
GIMP_PLUGIN,
G_N_ELEMENTS (thumb_args),
- G_N_ELEMENTS (load_return_vals),
- thumb_args, load_return_vals);
+ G_N_ELEMENTS (thumb_return_vals),
+ thumb_args, thumb_return_vals);
gimp_register_thumbnail_loader (LOAD_PROC, LOAD_THUMB_PROC);
}
@@ -176,7 +182,7 @@
gint *nreturn_vals,
GimpParam **return_vals)
{
- static GimpParam values[2];
+ static GimpParam values[4];
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
GError *error = NULL;
gint32 image_ID;
@@ -226,6 +232,15 @@
*nreturn_vals = 2;
values[1].type = GIMP_PDB_IMAGE;
values[1].data.d_image = image_ID;
+
+ if (strcmp (name, LOAD_THUMB_PROC) == 0)
+ {
+ *nreturn_vals = 4;
+ values[2].type = GIMP_PDB_INT32;
+ values[2].data.d_int32 = gimp_image_width (image_ID);
+ values[3].type = GIMP_PDB_INT32;
+ values[3].data.d_int32 = gimp_image_height (image_ID);
+ }
}
else
{
@@ -421,6 +436,7 @@
g_message ("EOF / read error on extension function code");
return image_ID; /* will be -1 if failed on first image! */
}
+
DoExtension (fd, c);
continue;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]