Generating picture tables for LCD from BMP/GIF/etc.

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

In a project which uses an 320x240 mono-graphical display there is to be displayed a circular device with two handles attached to the center of the circle and where one handles is to move one step to the right each minutes. Also known as a "watch".

The display is standing, i.e. height is 320, width is 240 and is written from lower left corner (point 0,0) and uppwards, 8-bits a time. thus resolution in y-direction is 8 bit, and resolution in x-direction is 1-bit.

Thingy is that i would like to see some cind of a software which not only converts a BMP to c-data table but wich also lets me define the direction, size of BMP, resolution, and origo in a BMP image.

There are tons of softwarez out there which will convert BMP to c-data table, but these is more conventional orientated or locked to one fixed size or display. But one which is more dedicated to graphical displays of generic cind is yet to be found.

I would like to hear your experience with generating pictures for a graphical display. Youst note that we do not have the sufficient SRAM available to first draw image in memory befor writing it to the display, only transfering predesigned images stored in flash directly to display. We are using mega2561.

Regards
Vidar (Z)

----------------------------------------------------------

"The fool wonders, the wise man asks"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

8-bit bmp is pretty much unpacked pixel data, but there are headers and palette before the image data.

Hexplorer is a hex editor in which you can for example select the data block you want, and export it to a file or clipboard as C array data.

It is not very hard to do a C program which can convert the bmp to whatever you like. Tons of info how to read a bmp.

- Jani

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plan A: store picture data in flash in 'standard' format... pixels across left to right, top to bottom, have the copy function pick up a pix from flash, write it to lcd in two nested loops, bit at a time or byte at a time, converting rows to colums. Plan B: convert the bmps to the nonstandard format with a pc utility, burn them into flash in this particular format, copy them to lcd as required. First way might let you load and save a bmp of the right size from the serial port by just stripping the header. BMPs are stored bottom to top arent they? That's wierd.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
BMPs are stored bottom to top arent they? That's wierd.

Nope it's the rest of the world that is weird - everyone knows that Microsoft is always right!