GIMP Chat http://gimpchat.com/ |
|
Exporting as PSD from Python? http://gimpchat.com/viewtopic.php?f=9&t=19123 |
Page 1 of 1 |
Author: | lam3001 [ Wed Feb 03, 2021 6:07 pm ] |
Post subject: | Exporting as PSD from Python? |
I am importing a PSD file and exporting a composite - that works fine. I can also save it as an XCF which is helpful for debugging. Is it also possible to export back to PSD from a GIMP script? I know the command exists in the program. I have tried both of these, where export_file_psd is the full path name ending in '.psd'. I think pdb.gimp_file_save would be correct but I am not sure what to pass in for the drawable, since I want to export everything, not just a single layer. pdb.gimp_xcf_save saves it in XCF format even if the file is named with a different extension. Code: Select all pdb.gimp_xcf_save(RUN_NONINTERACTIVE, image, None, export_file_psd, export_file_psd) |
Author: | ofnuts [ Thu Feb 04, 2021 5:53 am ] |
Post subject: | Re: Exporting as PSD from Python? |
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. |
Author: | lam3001 [ Thu Feb 04, 2021 12:51 pm ] |
Post subject: | Re: Exporting as PSD from Python? |
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? |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |