Mar-05-2024, 08:11 AM
(This post was last modified: Mar-05-2024, 08:11 AM by Gribouillis.)
Why not use the canvas postscript method to save the canvas as postscript then convert the postscript image to another format?
An old trick to convert eps to postscript:
Output:help(Canvas.postscript)
Print the contents of the canvas to a postscript
file. Valid options: colormap, colormode, file, fontmap,
height, pageanchor, pageheight, pagewidth, pagex, pagey,
rotate, width, x, y.
Also the pyscreenshot module saysQuote:The pyscreenshot module is obsolete in most cases. It was created because PIL ImageGrab module worked on Windows only, but now Linux and macOS are also supported.
An old trick to convert eps to postscript:
cv.postscript(file="circles.eps") from PIL import Image img = Image.open("circles.eps") img.save("circles.png", "png")See also pillow image formats
« We can solve any problem by introducing an extra level of indirection »