2

I was using the turtle module with Python to make a project. In the project, an image is displayed, with this line:

screen.bgpic("image.png")

This worked at first, but then I copied the files (both the python file and image.png) onto a flash drive. I tested it on another computer, and it worked fine there, but when I saved it onto the actual computer that I needed it to be on, it didn't work.

I know it's not a problem with the actual turtle, since it works before that part. I also am pretty sure it isn't a file problem since the same file worked before. It says:

Couldn't recognize data in image file "image.png"
B. Johnson
  • 45
  • 6

1 Answers1

1

Older versions of tkinter don't support .png files.

You can convert GIF or JPEG or another image file type with an external tool.

Jean-François Fabre
  • 137,073
  • 23
  • 153
  • 219
JaxLombard
  • 11
  • 1