Giter Site home page Giter Site logo

robertgallup / python-bmp2hex Goto Github PK

View Code? Open in Web Editor NEW
72.0 72.0 21.0 28 KB

Python utility to convert 1-, 4-, 8- and 16-bit bitmap files to hex. Used to embed graphics in Arduino/C code, primarily for display.

License: MIT License

Python 100.00%
arduino bitmap bytes graphics python xbm

python-bmp2hex's Issues

IndexError: list index out of range

hjc@hjc-PC:~/disk-2/tool/bmp2hex/python-bmp2hex$ python bmp2hex.py -w 32 320x240.bmp
PROGMEM const struct {
unsigned int width;
unsigned int height;
unsigned int bitDepth;
uint8_t *pixel_data[230400];
} 320X240 = {
320, 240, 24, {

}
};
Traceback (most recent call last):
File "bmp2hex.py", line 248, in
if name == 'main': main()
File "bmp2hex.py", line 106, in main
bmp2hex(f.name, tablewidth, sizebytes, invert, raw, named, double, xbm)
File "bmp2hex.py", line 226, in bmp2hex
v = values[ndx] ^ invertbyte
IndexError: list index out of range

batch process

it's great tool for me . I really hope add batch process and support output text file in the future.

How to create a bmp

Hello, i like your program, works with the examples but i don't know how i need to design my .bmp images, for example... for a ssd1306 and the correct instruction for convert to hex array format. I run it in OS X.

Please, can you help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.