ofnuts wrote:
You have to create a new drawable with whatever you want to export. Two possibilities:
1) gimp_layer_new_from_visible and export the result
2) duplicate the image, flatten it, and export its single layer.
That is basically what I am doing when I export a composite as a PNG or JPG. That works fine.
But I don't think either of those does what I want to do in the case of exporting a PSD. I am pretty sure they will both only output a single layer, ever. In GIMP, if you open a PSD and then Export as PSD, it exports a PSD file with all the layers intact (it might rename layers that had duplicate names), not a composite. So it seems like GIMP's API does not make this feature available?