Image to Byte array

Use this online image to Byte array tool for converting (monochromatic) bitmaps to data arrays (C++ style). You can use these arrays with programs for embedded systems with microcontrollers to output graphics on monochromatic LCD's or thermal printers (like Arduino with the Adafruit mini printer, which I needed this for). Probably the output also works for graphics monochromatic LCD displays like T6963C, KS0108, SED1335 etc. but haven't tested this yet.

This tool was meant as a quick online version of LCD Assistant, which is Win only. It creates files for use with a C compiler: for AVR, ARM, PIC, 8051 and ohter microcontrollers. You can use it directly with Arduino (tested), or probably any other design environment based on C compiler (not tested).


→ Image will be auto-converted to monochrome
→ Some LCD's & printers require image width to be a multiple of 8 pixels

How to

To convert an image from bitmap file (.jpg/.png/.gif, RGB/Grayscale) to a data array, simply upload it and hit 'Convert'.

This tool uses 8 pixels per byte and will try to auto-convert your image to black & white. It seems to have some problems with images containing indexed colors, so use RGB/Grayscale. Also; I got the best results with the Adafruit printer by using images with a width of a multiple of 8 (eg. 384 pixels wide).


Link to this page: “Image to Byte array”

You can link to this tool using this HTML code. Simply copy and paste it into your page:

<a href="https://manytools.org/hacker-tools/image-to-byte-array/">Image to C++ Byte array (for Arduino & thermal printer)</a>

If you have any problems using this Image to Byte array, please contact me.


Updates

August 18, 2017

Migrated to HTTPS

Happy to inform that Manytools is now fully Chrome-62-ready, thanks Google! A secure connection had been due for a very long time. Today we finally got around to upgrading the site to run on HTTPS. – (Starting October 2017, Chrome (version 62) will show a “NOT SECURE” warning when users enter text in a form on an HTTP page, and for all HTTP pages in Incognito mode.)

August 10, 2016

article personal

Who is this person?

Quickly lookup any person by e-mail address or name. Run an instant background check or find contact details & personal records (including public legal records).

November 23, 2013

bubbles

New: Ⓑⓤⓑⓑⓛⓔ text tool

Stand out; use special characters in your tweets or e-mails.

November 23, 2013

smallcaps

New: Sᴍᴀʟʟᴄᴀᴘs text tool

Look like a Bᴀɴᴋ with Sᴍᴀʟʟᴄᴀᴘs in your status-updates or e-mails.

November 21, 2013

dnssec lock

DNSSEC checker tool added

Domain not resolving? Check your DNSSEC here.