avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] Storing B&W bitmap images into Flash : file format sugges


From: Jim Brain
Subject: Re: [avr-chat] Storing B&W bitmap images into Flash : file format suggestion ?
Date: Sat, 09 Jan 2010 23:29:50 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]