Exporting a TIFF file

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Exporting a TIFF file

Developers mailing list
Disclaimer: I'm very new to plug-in programming.

I'm writing a plug-in in C that needs to export a drawable to a temporary
file in TIFF format.

I saw that some plugins [1] can do this, but as far as I see, libgimp only
offers gimp_file_save [2] and gimp_export_image [3], but neither fit my use
case: the former doesn't save to TIFF, and the latter requires user
interaction.

So how can I do this?
Can I call another plug-in from my plug-in? or should I simply link the
other plug-in code to mine?

[1] https://gitlab.gnome.org/GNOME/gimp/-/tree/master/plug-ins/file-tiff
[2]
https://developer.gimp.org/api/2.0/libgimp/libgimp-gimpfileops.html#gimp-file-save
[3]
https://developer.gimp.org/api/2.0/libgimp/libgimp-gimpexport.html#gimp-export-image
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list
Reply | Threaded
Open this post in threaded view
|

Re: Exporting a TIFF file

Developers mailing list
The file export/import methods are plugins, i.e. in the PDB.
You can browse the PDB using Filters>Development>Python-Fu>Python Console
then the Browse button.  There is one named "file-tiff-save"

Yes, you can call a PDB procedure from a C plugin using
gimp_run_procedure ()

No, you don't need to link plugin code, you link to libgimp, where
gimp_run_procedure() is.
_______________________________________________
gimp-developer-list mailing list
List address:    [hidden email]
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list