I have been writing a paint program in tkinter, and one of my functions saves the final canvas output (my image is rendererd on the canvas at coord 0,0). I save the canvas to memory as a postscript file and use PIL to save the postscript to disk as a PNG (PIL uses ghostscript when saving a postscript file). The canvas is always saved at 60.15% of it's original size, however. I would like to save the image as 100% of it's original size, though i can't figure out how to do this in my code.
Here is my code below:
"""my image is 256 x 256"""
ps = self.canvas_image.canvas.postscript(colormode='color', x = 0, y = 0,
height = 256, width = 256)
im = Image.open(BytesIO(ps.encode('utf-8')))
im.save(filepath, "PNG")
And here are my images (top is original image, bottom is saved image):