MCPcopy Index your code
hub / github.com/geekcomputers/Python / save_image

Method save_image

Image-watermarker/watermark.py:32–45  ·  view source on GitHub ↗
(self, image)

Source from the content-addressed store, hash-verified

30 return image
31
32 def save_image(self, image):
33 save_path = filedialog.asksaveasfilename(
34 defaultextension="*.png",
35 title="Save as",
36 filetypes=[
37 ("PNG files", "*.png"),
38 ("All files", "*.*"),
39 ],
40 )
41 if save_path:
42 try:
43 image.save(save_path)
44 except Exception:
45 print("Failed to save image: {e}")

Callers 1

save_imageFunction · 0.80

Calls 1

saveMethod · 0.45

Tested by

no test coverage detected