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

gimp_image_parasite_find, GimpImage, and metadata

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.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

gimp_image_parasite_find, GimpImage, and metadata Ulysses Levy 12 Feb 08:01
  gimp_image_parasite_find, GimpImage, and metadata Bill Skaggs 13 Feb 00:28
  gimp_image_parasite_find, GimpImage, and metadata Bill Skaggs 13 Feb 00:30
Ulysses Levy
2011-02-12 08:01:08 UTC (almost 14 years ago)

gimp_image_parasite_find, GimpImage, and metadata

I'm poking around plug-ins/metadata/metadata.c and I want to get gimp_image_parasite_find (image_ID, METADATA_PARASITE) to work.

I'm pretty sure gimp_image_parasite_find expects a parameter of type GimpImage, so I guess what I'm really asking for is the correct API to get the current GimpImage from a plug-in.

ps - sorry for the newbie question

Thanks, -uly

Bill Skaggs
2011-02-13 00:28:07 UTC (almost 14 years ago)

gimp_image_parasite_find, GimpImage, and metadata

On Sat, Feb 12, 2011 at 12:01 AM, Ulysses Levy wrote:

I'm poking around plug-ins/metadata/metadata.c and I want to get gimp_image_parasite_find (image_ID, METADATA_PARASITE) to work.

I'm pretty sure gimp_image_parasite_find expects a parameter of type GimpImage, so I guess what I'm really asking for is the correct API to get the current GimpImage from a plug-in.

No, image_ID is simply an integer. Core structures such as GimpImage do

not get passed to plug-ins, so
plug-ins can't make use of them. Instead things like images, layers, etc are represented by integer labels.
(Formally, by values of type GIMP_PDB_IMAGE, GIMP_PDB_LAYER, etc, but in fact those are just integers.)
The value of the image_ID is actually available as one of the params of the "run" function -- you should be
able to figure out the standard way to access it by glancing at a couple of existing plug-ins.

-- Bill

Bill Skaggs
2011-02-13 00:30:33 UTC (almost 14 years ago)

gimp_image_parasite_find, GimpImage, and metadata

Also I should have pointed you to the documentation at:

http://developer.gimp.org/api/2.0/libgimp/libgimp-gimpimage.html#gimp-image-parasite-find

-- Bill