1

I have an image (bpy.types.Image). I want to "Save a Copy" of the image, ie. save it to a specified file without modifying the image. I want to be able to specify the format to save as (eg. JPEG, PNG).

What's the best way to do this in Python?

scurest
  • 10,349
  • 13
  • 31
  • @Gorgious Yes (edited to clarify). – scurest Jan 12 '21 at 09:22
  • Do you want the image to be unpacked afterwards or it has to remain in blender memory as a packed data block ? Related : https://blender.stackexchange.com/questions/13407/auto-save-images-along-with-blend https://blender.stackexchange.com/questions/29123/how-to-save-a-packed-image-from-a-script/29126 – Gorgious Jan 12 '21 at 09:25
  • Like I said, I want the image to remain unchanged. Like with "Image>Save a Copy". The question is has been marked as a dupe of does not answer that. – scurest Jan 12 '21 at 16:26
  • Added a "save as" answer to dupe list above. – batFINGER Jan 16 '21 at 08:21

0 Answers0