how to use PNG images

Login to reply to this topic.
Fri, 2008-04-11 07:43
Joined: 2008-02-16
Forum posts: 10


Hi All,

I am developing an application in which I have to use PNG images but I am not able to get how I can draw the PNG images as I have
always worked on bmp . Can any body guide me in this.

Thanks
nikh


nikh


Fri, 2008-04-11 08:26
Joined: 2003-12-05
Forum posts: 587
Re: how to use PNG images

You have to use the Image Conversion Library (ICL) to convert all other types of images to Symbian bitmaps.

Fri, 2008-04-11 08:31
Joined: 2008-01-16
Forum posts: 69
Re: how to use PNG images

Hi nikh,

you can port it via CImageDecoder to a Bitmap and paint this to the screen!
or
just check this link and download the code and read me file.look for implementation of CPNGloader class.
http://developer.symbian.com/main/oslibrary/cpp_papers/getstarted.jsp
or
if you want to do same in native C,go through below link
http://www.pawfal.org/fluxus/docs/libfluxus-0.14/PNGLoader_8cpp-source.html

Hope these will solve your Problem! Eye-wink


Thanks & Regards,
Md.Khalid Ahmad

Sat, 2008-04-12 07:55
Joined: 2008-02-16
Forum posts: 10
Re: how to use PNG images

Hi Ahmad,

Thanks , I have one more query , In my application which I am developing I have to use many images for creating UI so in which format should I take the images in PNG format or in bmp format. If I use PNG format than I have to first convert it into bmp format then draw onto screen this might not be useful as I have many images in the UI and converting them may take time.

Thanks
nikh


nikh

Sat, 2008-04-12 17:18
Joined: 2003-12-05
Forum posts: 587
Re: how to use PNG images

If the images are static (always the same), use bmconv tool on the PC to convert them to one or many mbm files. Some even convert images on the server side in web enabled apps from jpg/bmp/gif to mbm before Symbian client downloads them.

Mon, 2008-04-14 09:49
Joined: 2004-11-29
Forum posts: 1134
Re: how to use PNG images


If the images are static (always the same), use bmconv tool on the PC to convert them to one or many mbm files. Some even convert images on the server side in web enabled apps from jpg/bmp/gif to mbm before Symbian client downloads them.

Seriously?!
That sounds really stupid to me.
jpg and gif are typically a lot better compressed then a mbm file, so to expand it to an mbm _before_ sending it over the network sounds immensely stupid (well, not from the operators point of view I guess...)
the overall operation time is also guaranteed to be a lot longer then sending the compressed image over the line and unpack it locally on the client.
image conversion isn't _that_ a heavy operation...

Keeping your images in a better compressed format then mbm:s could be a good idea to save on file size of your .sis, specially if you have a lot of images.

Mon, 2008-04-14 11:35
Joined: 2003-12-05
Forum posts: 587
Re: how to use PNG images

Seriously?!
That sounds really stupid to me.

I'm not doing this, just said I have heard people doing it Eye-wink Optimizing performance on the phone where data transfer sizes do not matter. This case was where it is assumed WLAN is used, so data transfer speeds are fast.

Mon, 2008-04-14 12:54
Joined: 2004-11-29
Forum posts: 1134
Re: how to use PNG images

I'm just surprised Smiling

Even with wlan it sounds improbable to me that you would gain in the end from unpacking them server side...
Though I don't have any measurements of it, or on the performance of CImageDecoder

In my experience though, CPU speed is not the limiting factor, 1st come network, then disk/file access, then buss speeds in the phone.
At least two of those get heavy hits if you transfer more data then needed, and easily the third too if you cache your images.

But don't take my words (or anyone elses) for the truth, if you (the general you, not you personally andreas Smiling ) measure that the unpacking of the images is the problem and that the network traffic is negligible, please do unpack server side...

  • Login to reply to this topic.