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?

  • $\begingroup$ @Gorgious Yes (edited to clarify). $\endgroup$
    – scurest
    Jan 12, 2021 at 9:22
  • $\begingroup$ Do you want the image to be unpacked afterwards or it has to remain in blender memory as a packed data block ? Related : blender.stackexchange.com/questions/13407/… blender.stackexchange.com/questions/29123/… $\endgroup$
    – Gorgious
    Jan 12, 2021 at 9:25
  • $\begingroup$ 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. $\endgroup$
    – scurest
    Jan 12, 2021 at 16:26
  • $\begingroup$ Added a "save as" answer to dupe list above. $\endgroup$
    – batFINGER
    Jan 16, 2021 at 8:21


Browse other questions tagged .