How to Display PNG file in Series 60 mobile phone?
| Wed, 2008-01-02 08:47 | |
|
|
Hi Everybody Happy New Year 2008. I want to display a PNG or JPG file in series 60 mobile phone but i dont know how to do it.When i display high resolution bmp file the emulator shows filicking image. Please give me some idea to solve the problem. Brajesh... Life is too short ! so do as many good things as you can do... |






Forum posts: 1134
CFbsBitmap is the symbian API for managing bitmaps _after_ they have been loaded into memory.
Its a handle to the pixel information stored in memory and has no relation at all to file image formats like bmp, png and jpg.
When you load the image from file, it is "decoded", decoding can be simple like with bmp, or more advanced like in jpg.
For the more advanced formats like png and jpg, you use the class CImageDecoder to read them into memory (into CFbsBitmaps) and CImageEncoder to write CFbsBitmaps to files.
The flickering could be due to you doing too much work in the Draw function, this function must be as light weight as possible.
Never, EVER load bitmaps in it for example.
Also try to avoid any scaleing. Its better to pre-scale and display the scaled bitmap instead of dynamically scale in the Draw function.
Or are you using DSA? Then there is a whole bunch of more reasons it could flicker.
Forum posts: 123
Thanks alh,
No , i am not using DSA but what is it ? will u tell me please..
And i request you to give me a good link of tutorial regarding Image Decoding and Encoding....
Brajesh...
Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++
Forum posts: 1134
Unfortunately I don't know of any good tutorial for it...
But if you search for "CImageDecoder" and "CImageEncoder" on this forum, you will get lots of examples, and can learn from others mistakes.
DSA is "Direct Screen Access", meaning that your app draws directly to the screen, instead of (as normal apps) do all screen drawing through the Window Server.
To do this you have to use an api called CDirectScreenAccess, to be able to cooperate with the window server.
(You use the api to tell wserv you want to take over drawing for a specific window, and wserv in turn will tell you where on the screen this window is currently showing, and notify you if it moves)
It should be avoided though unless you really need it, and mostly you don't need it.
Forum posts: 123
ok thanks...
Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++