×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Location
    IL/USA
    Posts
    341

    Storing Images .as byte[] vs .png format [HELP NOKIA!]

    Hi,

    I need way to load .png images so that excessive amounts of memory are not consumed keeping them in memory on heap. I am using Image class now. I am thinking about byte[] instead.

    I know that .png are in compressed format but i'm not even sure if Image class retains it this anyway.

    I am concerned that I read somewhere the S60 3rd Ed. stores image bitmap data in Host OS memory and Image class the reference on heap. I am worried this is bad and not sure how often, if at all, Host memory is garbage collected or in enough time before application runs out of Host OS memory! At least byte[] will not use Host memory which is a good thing.

    I could compress images into one large byte[] data file and extract/decompress when I need an image when needed.

    I would greatly appreciate it if someone from Nokia or anyone knowledgable about this could help me before I waste of a lot of time converting Images and code to use byte[], only to discover no significant change in memory consumption or perhaps made it worse!

    Thanks!
    Erica A Ramsey / Mobile Apps Developer /
    Resume ~ http://home.comcast.net/~erica.ramsey/CV
    Some Project Screenshots ~ http://home.comcast.net/~erica.ramsey/CV/screens.html

  2. #2
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Malaysia
    Posts
    126

    Re: Storing Images .as byte[] vs .png format [HELP NOKIA!]

    Hi,
    Go get this example game from Forum Nokia:
    http://sw.nokia.com/id/748737bb-3d12...de_v2_0_en.zip

    Yes, it is great to reduce the memory consumption. However, byte[] can be applied on RecordStore (database), use array method, as shown from the above sheepdog game. Good luck.

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Location
    IL/USA
    Posts
    341

    Re: Storing Images .as byte[] vs .png format [HELP NOKIA!]

    Thank you!
    Erica A Ramsey / Mobile Apps Developer /
    Resume ~ http://home.comcast.net/~erica.ramsey/CV
    Some Project Screenshots ~ http://home.comcast.net/~erica.ramsey/CV/screens.html

  4. #4
    Registered User
    Join Date
    Mar 2003
    Location
    London
    Posts
    37

    Re: Storing Images .as byte[] vs .png format [HELP NOKIA!]

    It's much better to keep in memory all the images you need.
    If you start creating and deleting images, you will face with a memory fragmentation problem.

  5. #5
    Regular Contributor
    Join Date
    Mar 2003
    Location
    IL/USA
    Posts
    341

    Re: Storing Images .as byte[] vs .png format [HELP NOKIA!]

    I have too many images to keep them all in memory. Would using byte arrays instead of Image class help any?
    Erica A Ramsey / Mobile Apps Developer /
    Resume ~ http://home.comcast.net/~erica.ramsey/CV
    Some Project Screenshots ~ http://home.comcast.net/~erica.ramsey/CV/screens.html

Similar Threads

  1. Storing Images .as byte[] vs .png format [HELP NOKIA!]
    By earamsey in forum Mobile Java General
    Replies: 6
    Last Post: 2007-10-10, 15:06
  2. storing images in XML
    By amitsingh18 in forum Symbian
    Replies: 8
    Last Post: 2005-02-16, 09:05
  3. create .png from 1-n .png images on server
    By idrop in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2003-07-24, 09:58
  4. Storing of Captured images
    By Ghouse in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2003-05-27, 11:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×