← back to projects

draw

I created a page on my website that lets you draw in black and white on a 24x24 grid. You can find the code within this site’s GitHub page.

You can export your drawing as a PNG. This uses a canvas, redrawing your drawing at 16 times the scale and then downloading it as a PNG.

You can generate a link to your drawing. This encodes the drawing into a binary string and then into a hex string, adding it as a parameter to the URL. When you open the URL, the hex is decoded into a binary string and then into the grid.

You can email me the drawing. This opens a link with a prefilled subject and body containing your drawing’s URL. I initially wanted to send the PNG but that is impossible without a server of sorts. I then tested out representing the grid as ASCII art in the email body but it couldn’t format well with body length restrictions. Then I got the idea for encoding the grid and generating links. I added a filter to my inbox that automatically categorises these emails.

I could’ve made this project more complex with different colours and erasing etc but it is simple on purpose and I think being able to erase is sometimes a drawback (although if you really want to you can edit the hex of a generated link).

skills