Re: gif to binary data
- From: "Tom Lucas" <news@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 13 Sep 2006 14:49:00 +0100
"tanu" <tanumeister@xxxxxxxxx> wrote in message
news:1158148235.476036.290200@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hi all
i m using a 240*128 pix lcd with t6963c controller
wanna see the graphics in it
lcd is interfaced with atmega 128 microcontroller
By assigning 3840 bytes for the Bitmap buffer I assume you are using 1
bit per pixel black and white. I can't see a reason why the LCD array is
the size it is 42240 bytes or why you need to define it. A frame buffer
of 3840 will be plenty by itself.
for graphics i thougt of converting the gif file to binary data so did
this
The files would definitely have to be treated as binaries when opening,
although you shouldn't have to convert anything - fopen will handle
that.
i had 1st save the gif file in to the txt
so to get ascii data
before i aslo tried direct gif to binary
The gif won't map directly to your bitmap buffer - you will need to
decode it. Why don't you start with a bitmap file until you get the hang
of the display and then move onto compressed formats like gif.
i m getting binary data rite acording to the txt file but when i m
seeing this data
in the lcd i m not getting that image
infact i had discarded the 22 bytes from the data
Do you mean that 22 bytes of the data were missing from the buffer or
did you purposefully discard them. If so, why? Is this you stripping off
the header?
If you use bitmap data then you can just copy the data section of the
file straight to the buffer. In windows bitmaps, the 32bit word in the
11th, 12th, 13th and 14th bytes of the file tells you how far from the
start of the file the data begins.
<snip code>
Your code could really use some comments and some more meaningful
variable names.
so do tell me where m i wrong
and do tell if there is any other way to find the binary data
You may need "rb" in your fopen to open the file as a binary file. Other
than that then you should have the binary data where you want it but I'm
not convinced it will be data in the form you think it should be.
And for goodness sake use capital letters and apostrophes - you're a big
boy now.
.
- Follow-Ups:
- Re: gif to binary data
- From: tanu
- Re: gif to binary data
- References:
- gif to binary data
- From: tanu
- gif to binary data
- Prev by Date: Re: SD Card FAT support issues (dosfs, fatfs,fatlib)
- Next by Date: Re: SD Card FAT support issues (dosfs, fatfs,fatlib)
- Previous by thread: Re: gif to binary data
- Next by thread: Re: gif to binary data
- Index(es):
Relevant Pages
|