BMP to code
Skip to content
Search or jump to…
Pull requests
Issues
Marketplace
Explore
@afkingshuk
Learn Git and GitHub without any code!
Using the Hello World guide, you’ll start a branch, write comments, and open a pull request.
javl
/
image2cpp
5
15036
Code
Issues 3
Pull requests 0 Actions
Security 0
Insights
image2cpp/index.html
@jochenderwae jochenderwae Fix for #28
f6f4ebd on Dec 4, 2019
@javl@jochenderwae@whoisnian@davidalim
1252 lines (1121 sloc) 48.4 KB
image2cpp
© 2020 GitHub, Inc.
Terms
Privacy
Security
Status
Help
Contact GitHub
Pricing
API
Training
Blog
About
image2cpp
image2cpp is a simple tool to change images into byte arrays (or your array back into an image) for use with Arduino and (monochrome) displays such as OLEDs. It was originally made to work with the Adafruit OLED library. An example sketch for Arduino and this library can be found here.
More info (and credits) can be found in the Github repository. This is also where you can report any issues you might come across.
This tool also works offline. Simply save this page to your computer and open the file in your browser.
1. Select image
or
1. Paste byte array
x
px
2. Image Settings
Only images file type are allowed
No files selected
0 - 255; if the brightness of a pixel is above the given level the pixel becomes white, otherwise they become black. When using alpha, opaque and transparent are used instead.
Note: centering the image only works when using a canvas larger than the original image.
3. Preview
4. Output
Adds some extra Arduino code around the output for easy copy-paste into
this example.
If multiple images are loaded, generates a byte array for each and appends a counter to the identifier.
Adds some extra Arduino code around the output for easy copy-paste.
If multiple images are loaded, generates a single byte array.
Creates a
First ASCII character value is used only if a glyph identifier of length equal to 1 is not provided for each image. The value itself will be incremented by 1 for each glyph.
GFXbitmapFont formatted ouput. Used by a modified version of the Adafruit GFX library.
GitHub project and example here.
First ASCII character value is used only if a glyph identifier of length equal to 1 is not provided for each image. The value itself will be incremented by 1 for each glyph.
If your image looks all messed up on your display, like the image below, try using a different mode.
Comments
Post a Comment