RSS/Atom feed Twitter
Site is read-only, email is disabled

How can I set the number of layers of thumbnail?

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

How can I set the number of layers of thumbnail? tks 21 Oct 15:42
  How can I set the number of layers of thumbnail? Sven Neumann 22 Oct 08:22
   How can I set the number of layers of thumbnail? tks 22 Oct 14:43
    How can I set the number of layers of thumbnail? tks 07 Nov 12:14
tks
2008-10-21 15:42:15 UTC (over 16 years ago)

How can I set the number of layers of thumbnail?

Hi!
I'm writing this plug-in for GIMP-2.6 on Fedora 9. http://registry.gimp.org/node/9036

I added ability to load as a thumbnail but it only showed file name and file size in preview box of save dialog. I want to show more information such like image width, height, and number of layers.
I modify these lines based on "libgimpthumb/gimpthumbnail.c"

query (void) {
//////////////////////////////
static const GimpParamDef thumb_return_vals[] = {
{ GIMP_PDB_IMAGE, "image", "Thumbnail image" }, { GIMP_PDB_INT32, "image-num-layers", "The number of layers" }, { GIMP_PDB_INT32, "image-width", "The width of image" }, { GIMP_PDB_INT32, "image-height", "The height of image" } };
///////////////////////////////

run (name, ///////////////////////////////
else if (strcmp (name, LOAD_THUMB_PROC) == 0) {
image_ID = load_thumbnail (param[0].data.d_string, &nlayers, &error);

if (image_ID != -1) {
*nreturn_vals = 5;
values[1].type = GIMP_PDB_IMAGE; values[1].data.d_image = image_ID; values[2].type = GIMP_PDB_INT32; values[2].data.d_int32 = 666; /* image-num-layers */ values[3].type = GIMP_PDB_INT32; values[3].data.d_int32 = 777; /* image-width */ values[4].type = GIMP_PDB_INT32; values[4].data.d_int32 = 888; /* image-height */ }
////////////////////////////
(Full source code is here. http://www.sutv.zaq.ne.jp/linuz/tks/item/file-xmc.c ) The result is here.
http://www.sutv.zaq.ne.jp/linuz/tks/item/preview.png

If things go well, preview showld become 777 x 888 pixels
666 layers
but actual result is
666 x 777 pixels
It seems that "image-num-layers" is ignored! Then, how can I set the number of layers for a thumbnail? Or, is it impossible?

I also tried to read "app/widgets/gimpthumbbox.c", but it's a hard work...

tks

Sven Neumann
2008-10-22 08:22:52 UTC (over 16 years ago)

How can I set the number of layers of thumbnail?

Hi,

On Tue, 2008-10-21 at 22:42 +0900, tks wrote:

It seems that "image-num-layers" is ignored! Then, how can I set the number of layers for a thumbnail? Or, is it impossible?

Sorry, but you can't. Currently the procedure that opens the thumbnail can only specify the size of the original image. We could add the possibility to optionally the specify number of layers. Currently it is not possible though.

Sven

tks
2008-10-22 14:43:40 UTC (over 16 years ago)

How can I set the number of layers of thumbnail?

*** Sorry Sven for sending twice, but I forgot to send to gimp-dev list. *** Hi Sven. You always help me!

Sorry, but you can't. Currently the procedure that opens the thumbnail can only specify the size of the original image. We could add the possibility to optionally the specify number of layers. Currently it is not possible though.

I see.
If I can write a patch, I will send it to bugzilla...

tks

tks
2008-11-07 12:14:16 UTC (over 16 years ago)

How can I set the number of layers of thumbnail?

Hi!
I wrote a patch and send it to bugzilla. http://bugzilla.gnome.org/show_bug.cgi?id=559725

It works fine on my environment at least.

Sorry, but you can't. Currently the procedure that opens the thumbnail can only specify the size of the original image. We could add the possibility to optionally the specify number of layers. Currently it is not possible though.

I see.
If I can write a patch, I will send it to bugzilla...

tks

tks