On 1/9/2010 9:11 PM, Vincent Trouilliez wrote:
Hi list,
- What's the usual/easiest file format that people use, to store 1-bit
(black and white) bitmap images/pictures ?
That may be the question you've asked, but I'm not sure it's the right
one to ask. You want to store the binary data in FLASH in the smallest
format possible that does not require lots of computation to decode.
For the pic, I think you should store the data as RLE data in FLASH.
Then, write some little C app on Windows or Linux that takes BMP or GIF
or whatever and converts it. A quick app can easily take a BMP and
output a C source file that defines a PROGMEM array of bytes. Add the
utility step to Makefile, include the resulting C file in your
compilation, and you're done with storage. RLE decoders are trivial to
write, and you've got a space optimized graphic in FLASH that can be
easily displayed.
For the bitmap, I'd do something similar. Write a small C app that takes:
Chars.txt:
***
* *
*****
* *
* *
...
Or whatever, and converts it into a 2-D array in C source code. include
it as you compile, and you're done.
From a font perspective, the above has been done before. Just pull
some usable source from someone, as there are lots of C source charsets
out there.
Jim
_______________________________________________
AVR-chat mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-chat