How to display an image stored in the C: drive of the mobile on the screen?
| Thu, 2008-01-10 11:49 | |
|
|
Hi everybody, I have a problem please help me in solving it... (1).First i received the responce buffer (iResponceBuffer) from the server in HTTP communication.And written it in a file which is created in FileStream mode and whose extension is .bmp .The URL of the file stored on the server is "http://192.168.1.113/admin/brajesh/image3.bmp" and i written into the c:\ of the emulator .Code for this is given below. void CHTTPExampleEngine::MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent)Now problem is that when i open the stored bmp file, it shows the size of 4MB but shows preview is not available. what is the problem???????? Please help me..... I shall be very thank full to you.... Brajesh... Life is too short ! so do as many good things as you can do... |






Forum posts: 1197
Why do you convert your 8 bit descriptor to a 16 bit one, and then back to an 8 bit one again?
When you do "Copy", it will expand each 8 bit value in the source descriptor to a 16 bit value.
Then in the file write function, you access the memory of the 16 bit descriptor directly as an 8 bit descriptor...
Probably this is your problem, if you look in the file in a hex editor, probably every second byte in your file is "0x00", meaning you have trashed the contents.
There is no reason at all for you to convert it to a 16 bit descriptor and back again, keep it as an 8 bit all the way through.