Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
CaptainSpeedster

Picture to python turtle

Recommended Posts

Posted · Original PosterOP

I am new to coding, we are learning it slowly in school and for the end of the year we need to make a simple click game.

I know how to do everything but to make my process quicker i want to know if there is a program that converts a simple picture into raw python turtle code? 

We are doing it in an online program so i cant just import a picture as background.

Thanks

Link to post
Share on other sites

I've done this once. I forget which library I used to do the image processing.

What you'll need is a way to read the image, get it's size, and get a color value for each pixel. Set your canvas up to be the same resolution as the image, and start moving the turtle along the canvas, looking up what color it should be drawing by reading that pixel in the image.

Be warned though, drawing a picture with turtle graphics in python is OVERWHELMINGLY slow, especially if you have to change colors frequently.


I will never succumb to the New Cult and I reject the leadership of @Aelar_Nailo and his wicked parrot armies led by @FakeCIA and @DildorTheDecent. I will keep my eyes pure and remain dedicated to the path of the One True; IlLinusNati

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×