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

Weird question: how to retrieve a saving plugin's mime type?

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.

1 of 1 message available
Toggle history

Please log in to manage your subscriptions.

Weird question: how to retrieve a saving plugin's mime type? Alessandro Francesconi 11 Jun 10:23
Alessandro Francesconi
2013-06-11 10:23:18 UTC (over 11 years ago)

Weird question: how to retrieve a saving plugin's mime type?

Hello,
I'll try to be more precise than the title: I'm the developer of BIMP - Batch Image Manipulation Plugin for GIMP (http://www.alessandrofrancesconi.it/projects/bimp/) and I'm trying to implement a new feature.
This plugin provides an interface similar to the GIMP's PDB dialog: http://static.blogo.it/ossblog/Figure2pdb_3.jpg The user can select one of the plugins from the list and use it on the batch process. Not all the procedures from the whole DB are provided (it's a "filtered" subset) and I'm try to include the possibility to select a "saving plugin", for example one of those named in the form "file-XXX-save", where XXX is a file format like JPG, BZ2, DDS and so on.
I already know how to get all the information about a given plugin with the function 'gimp_procedural_db_proc_info()', but now a particular detail is missing: I need to know which mime type is handled by the plugin. For example, giving the plugin 'file-openraster-save', the function must return 'opa'.
I didn't see any APIs about this, so I took the GIMP's source code and I opened the source of the application saving dialog: 'file-save-dialog.c'. Here the developers use the following system to retrieve the mime type of a saving plugin, if I understand:
- they access to the saving procedure (e.g. "save_proc") as a datatype 'GimpPlugInProcedure' - they access to its handled extension with save_proc->extensions_list->data (but what datatype does it have?)
Reading the docs, I see a function called 'gimp_plug_in_procedure_find(GSList* list, const gchar* name)'... so apparently I can get the procedure object in this way... but what is the 'list' parameter? Where to retrieve it? Also, how is 'GimpPlugInProcedure' datatype structured? A lot of things are missing from the GIMP-dev's reference and I'm groping in the dark :(

Ale