Converting bitmap to code

Converting bitmap to code

Conversion can be done in multiple ways, but we'll focus just on some of them.

These types of conversion are usually done by software, so we're going to do the same.

Software conversion

One of the programs that are rather simple, yet capable of doing this, is Image Converter 565.

You can download it from our website and when you open it, you'll get a screen like this.

ImageConverter565 interface

The program itself is pretty simple - you upload the bitmap, convert it, and export the code!

You can also change the desired size if you want so.

An image has been imported

The end product will look something like this.

Full bitmap code in RGB656 (Notepad++ editor)

All you need from this code is this constant called 'icon'. Just copy it inside your program and use it!

Another one of those programs is LCD image converter which does things pretty similarly and is equally easy to use. 

Alternatively, if you're working with smaller images, you can just copy the color codes pixel-by-pixel inside of an array just like this one. Just remember to convert the color to RGB565 ( since the colors are usually in RGB888).

Plans and prices

Subscribe and get a new STEM Box project delivered to your doorstep every 3 months. Select your billing model:

3 months

$99/Box

2 years

$79/Box

Save $160 + Free Tools pack
Boxes ship every month
Free worldwide shipping
Shipped from US, Canada, UK, Australia or EU
Subscription renews automatically
Cancel anytime

Plans and prices

Subscribe and get a new Wacky Robots project delivered to your doorstep every month. Select your billing model:

1 month

$38/Box

6 months

$33/Box

Save $30 + Free Tools pack

1 year

$30/Box

Save $96 + Free Tools pack
Boxes ship every month
Free worldwide shipping
Shipped from US, Canada, UK, Australia or EU
Subscription renews automatically
Cancel anytime