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

file_jpeg_save in a c plugin

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.

file_jpeg_save in a c plugin alu3726 16 Jul 16:52
  file_jpeg_save in a c plugin Martin Nordholts 16 Jul 16:58
   file_jpeg_save in a c plugin alu3726 16 Jul 17:35
2009-07-16 16:52:28 UTC (over 15 years ago)
postings
2

file_jpeg_save in a c plugin

Hola, hi.

I am trying to save an image as a jpeg file in a c-plugin. The problem is that I have not been able to use the file_jpeg_save function.

Any help appreciated! Thanks!

(code excerpt) // works!
gimp_file_save(GIMP_RUN_INTERACTIVE, nimage,
vector_drawables[i]->drawable_id, name, name);

// DOES NOT WORK! :(
file_jpeg_save(GIMP_RUN_NONINTERACTIVE, nimage,
vector_drawables[i]->drawable_id, name,
name,
quality,
0,
1,
1,
"",
0,
1,
0,
2); // 14 parameters

Martin Nordholts
2009-07-16 16:58:52 UTC (over 15 years ago)

file_jpeg_save in a c plugin

On 07/16/2009 04:52 PM, Javier R. wrote:

Hola, hi.

I am trying to save an image as a jpeg file in a c-plugin. The problem is that I have not been able to use the file_jpeg_save function.

There is no such function in the C plug-in API, but you can invoke the PDB function called file-jpeg-save with gimp_run_procedure() like this:

gimp_run_procedure ("file-jpeg-save" ... etc)

Grep the source for gimp_run_procedure() for samples on how to invoke it and pass parameters to functions, you may also refer to its documentation: http://developer.gimp.org/api/2.0/libgimp/libgimp-gimp.html#gimp-run-procedure

/ Martin

2009-07-16 17:35:29 UTC (over 15 years ago)
postings
2

file_jpeg_save in a c plugin

?Many thanks for your fast response, Martin!

I'll check the documentation link that you propose and see if I can work this out.

Muchas gracias de nuevo,
Javier Ruiz

There is no such function in the C plug-in API, but you can invoke the PDB function called file-jpeg-save with gimp_run_procedure() like this:

gimp_run_procedure ("file-jpeg-save" ... etc)

Grep the source for gimp_run_procedure() for samples on how to invoke it and pass parameters to functions, you may also refer to its documentation: http://developer.gimp.org/api/2.0/libgimp/libgimp-gimp.html#gimp-run-procedure

/ Martin