1
import turtle 
from PIL import Image
def convert(w,name):
    w.getscreen().getcanvas().postscript(file = name+'.eps')
    fig = Image.open(name+'.eps')
    img = fig.convert('RGBA')
    return img

tur1 = turtle.Turtle()
tur1.forward(30)
img = convert(tur1,'img1')
img.show()

Is there way to not open the turtle window while its running?, I only want the image as the output.

ggorlen
  • 44,755
  • 7
  • 76
  • 106
hacker bot
  • 13
  • 2
  • 1
    Does this answer your question? [Hide Turtle Window?](https://stackoverflow.com/questions/7236879/hide-turtle-window) – Random Davis Sep 27 '22 at 20:33

0 Answers0