Image2Arduboy - Image to Hex Byte Array Tool


I spent some time writing a tool to make it easier to get your images onto the Arduboy.
It is similar to MrBoggieMan’s tool that takes an image in and generates the 1-bit hex array that Arduboy can use to render in drawSlowXYBitmap function.

I’ve tested on my Dev Kit but for demonstration purposes, I used Arduboy in Javascript

(I used MrBoggieMan’s Arduboy in Javascript to demonstate. Thanks MrBoggieMan!)

It’s a me:


  • Takes PNG, JPG, GIF and BMP
  • Allows to filter by Alpha, R, G or B channel
  • Invert output
  • Original Image (resampled if needed) and converted image preview
  • If the image is larger than 128 px wide or 64 tall, the image will be resampled
  • Generates code for 1 bit encoded hex byte array with the dimensions in the file name: FileName_(Width)_(Height) for easy calling drawSlowXYBitmap

Instructions / Download

  1. Download and install Mono Framework:
    (You must run this application using the Mono Command Line)

  2. Download Image 2 Arudoby:
    (I’d like to track stats!)

  3. Unzip Image 2 Arduboy

  4. Execute using command line: $ mono ImageToArduboy.exe

  5. Load your image

  6. Set your threshold values

  7. Copy the code into your IDE:

arduboy.drawSlowXYBitmap(0, 0, mario_64_64, 64, 64, 1);

(See that the file name contains the dimensions of the image so you can pass them into the function)

  1. Run your program on the Arduboy

Version 0.1

-Known Issues:

  1. I know that some images cause crashes. Please post those images so I can have some cases to debug. Image processing is hard!
  2. File names with spaces keep the spaces in the code generated. When I attempted to fix this, Xamarin would crash on a simple removal of space in the string. Will update when stable.
  3. Only generates hex array for drawSlowXYBitmap currently since drawBitmap vertically within pages across columns as I understand it
  4. Stand alone .exe execution in windows will do nothing. The program will hang and not show up in task manager. If you find the process and try to kill it, it does nothing. Does anyone know how to fix this? I spent nights trying to get this to stop happening. Mono command line is the only way to run the program.
  5. Copy and Pasting the text from the application directly into Arduino IDE causes some odd java exception. I’m actively trying to figure out what this is and in the mean time, just paste the text somewhere else, copy and then paste back into the Arduino IDE.


I’ve coded a lot of games in lots of environments but I’ve never written a traditional application. This was an exercise to increase my knowledge and programming prowess. I also wanted another code sample in my portfolio.

I use GTK# 2.0 in Xamarin Studio. The application seems deceptively simple but it was not straight forward to work with the GTK# framework. Open source is great, but it comes with its thorns. Big sharp thorns. I wanted it to be multi-platform but GTK and Xamarin left me with a bad taste in my mouth. The logic of what I wanted was done in a few nights but I spent 4 times that fighting GTK, GDK and Xamarin itself. In the end if I could not generate an executable that would run in .Net on windows. Mono command line was the only option. I look forward to finding someone to talk to about that. (If someone would like to discuss why the executable is fine in Xamarin on OS X, but on Windows only Debug build works, I’d be game!) If I try to execute the app by double clicking on it, the application doesn’t open any window, the file locks in the System and cannot be killed, stopped or deleted.

Please leave feedback, comments, bugs or if you find the tool useful! Thanks!


Looks good so far :smile:
Was making it a standalone executable part of the challenge? Else you could’ve just made it a web application. I assume most people have access to the internet while developing and this way they don’t have to install anything (and they also don’t have to redownload when you update the app).

A great feature would be to be able to import a spritesheet, fill in the the tile width and height to then generate a 2D array of all tiles.

1 Like

A great feature would be to be able to import a spritesheet, fill in the the tile width and height to then generate a 2D array of all tiles.

DDSiege11, The graphics converter I’ve been working on can convert a strip of tiles (or sprites) all at once into code. It’s not quite ready to share with the public, but if it would help with Arduventure I’d be happy to let you use it!

I was just suggesting a feature for this tool ^^’ I already made some simple converter tools in HTML :wink:
Thanks anyway :slight_smile:

Heya guys. Sorry, been sick and then under huge deadlines at work. Thanks for the feedback! I built the tool because yea, I wanted experience building an app, something to add to my portfolio under the “Tools” section and I just wanted to be able to load up lots of images all at once to ease iteration time. Trying to decide on what to make now. When I go back to solve some of the issues I mentioned that bug me I’ll look at the spritesheet functionality. I don’t think it’d be too bad. I might want to draw a grid into the preview buffer. That way you can specify your cut dimensions and see it.

(Link here until I figure out how to edit the original post…)

Version 1.1 updated and a new host. I let a host expire and that was my bad, made the links unusable. I’ve rehosted the files and updated the tool that I used to make Star Honor

Version 1.1

  • Added the ability to output a screen vertical page format that allows the image to be rendered using .drawBitmap() instead of .drawSlowXYBitmap(). It outputs a hex byte array arranged for drawBitmap() by default
  • Fixed several crashes related to certain image formats
  • Fixed a downsampling issue for odd sized dimensions
  • Faster rendering, caching of results
1 Like

I have download the Windows-Version. It doesn´t start on my Win10 :-/

The download link is broken.

1 Like

Use this one: