ofnuts wrote:
The file-*-save procedure do not save the image, they save a layer. What happened in your case is likely that the initial layer is no more. If you merged things (gimp_image_flatten(), gimp_image_merge_down() and a few others) the result is a new layer, but the call returns the layer created. So you just have to keep that returned value.
If your image still has several layers at the end, instead of flattening you can also use gimp_layer_new_from_visible() and save the returned layer.
Thank you for the response.
I guessed that much. In fact, after the post, I did a pdb.gimp_image_merge_down to get a new layer but pdb.file_jpeg_save doesn't take layers as a parameter.
pdb.file_jpeg_save(image, drawable, filename, raw_filename, quality, smoothing, optimize, progressive, comment, subsmp, baseline, restart, dct)
I tried
pdb.gimp_image_set_active_layer(image, newLayer)
and that doesn't do anything.
So what do I do with the returned layer?