GitXplorerGitXplorer
j

image2cpp

public
579 stars
169 forks
15 issues

Commits

List of commits on branch main.
Verified
ef9d7737cebbe77ff9e150b98ced3b7c68a92f7f

Add missing closing quote in arduino_single mode comments

sslimer37 committed a month ago
Verified
840c63e5ec7ac825e17b2c10024f149f67958a6e

Fix 'NaN' identifier when using Arduino single bitmap mode

sslimer37 committed a month ago
Verified
56228e57a3bf366a747b22fe972c2010b34be8b6

Update FUNDING.yml

jjavl committed 3 months ago
Verified
16269b963a92fd790740c472a03cbc589a8053ea

Update README.md

jjavl committed 3 months ago
Verified
c2e042bff30a1f142f0aa610f37fdf3862c881d2

Update README.md

jjavl committed 4 months ago
Verified
54f78768d07b8b51f4a33b48471131664a5507c7

Merge pull request #59 from javl/dependabot/npm_and_yarn/word-wrap-1.2.4

jjavl committed a year ago

README

The README file for this repository.

image2cpp

An online version of this tool is live at http://javl.github.io/image2cpp/

image2cpp is a simple tool to change images into byte arrays (or your array back into an image) for use with (monochrome) displays suchs as OLEDs, like those from Adafruit or Sparkfun. While searching for a way to generate these arrays, I mostly found links to a piece of Windows software. Both the flakey results and the hassle of having to boot a virtual machine just to convert an image lead to me writing this pure html + javascript solution.

Alternatively you can also enter a byte array as input to turn it back into an image. This might be useful for debugging, or when you want to write the byte array yourself. I don't know.

Did you find this tool useful? Feel free to support my open source software (especially when used commercially):

GitHub Sponsor

BMC

Running the tool

You don't need any special dependencies / internet connection; all the necessary parts sit in a single .html file. So just open this index.html page in a (recent) browser to run the tool. Or you can use the online version at http://javl.github.io/image2cpp/

Example Arduino code

You can find a simple Arduino example sketch over here in the repository.

Screen types

I wrote the code with my 128x64 pixel monochrome OLED display in mind, but it should work with most similar displays. You might need to change some export settings; those are explained in the tool.

Credit

Initial code by javl with aditional code by (in alphabetical order):

The example sketch is based on code by Adafruit. Dithering code from stellar-L3N-etag.

License

image2cpp is released under GPL v3. This means you can use the project in any way you want (use, adapt, distribute, etc.) as long as you share any changes and link back to this repo. See LICENSE.md for more info.

Please do consider a donation when used commercially. Thank you.