×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    13

    Problem in showing images

    Hello Sir,


    I tried to show all the images present in the phone through my application.It raised 'Out of Memory' exception. So, I tired to view at least 3 images at a time of size around 200 kb each. Still facing the same problem.How to fix this? Kindly help me out......

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Problem in showing images

    What phone, and how big are the images (in pixels, not bytes)? Check the device specifications, and this wiki article.

    Graham.

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    13

    Re: Problem in showing images

    Phone 3110c.

    Pixels 1024 * 768
    size around 56 kb to 100 kb files

  4. #4
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: Problem in showing images

    Quote Originally Posted by varunmails View Post
    Phone 3110c.

    Pixels 1024 * 768
    size around 56 kb to 100 kb files
    Hi,
    Welcome to the Forum Nokia developer boards,
    Well,as you have written that the image size is 200 kb per image,and hence the total image size would be around 600 KB.Therefore we would like to ask that why you are taking so heavy images.Why do not you take size around 15-25 KB.

    Another things is of interest is that how and where you are creating the image..I mean please check that you are not loading the same in a loop,

    And where you are calling the repaint() I mean in the infinite run() or on the keypressed.I would recommend that cal the repaint on the key pressed if you are not paying a rich animation.


    Please check that the jar and heap size limitation of the targeted device is
    Maximum Heap Size 2 MB
    Maximum JAR Size 1 MB
    Please check the above points,and please provide more information about the issue if still not get solved.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  5. #5
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Problem in showing images

    3110 Classic has 2Mb of heap.

    An image 1024 x 768 pixels, assuming 16 bits per pixel, requires 1.5Mb. More than that if the bit-depth is greater. At 32 bits per pixel, each image needs 3Mb of heap to load. I don't know what bit-depth the device will use. But either way, you can see that you will not be able to load more than one image, and you might not be able to load even one.

  6. #6
    Regular Contributor
    Join Date
    Jul 2008
    Location
    Faridabad(Delhi NCR)
    Posts
    343

    Re: Problem in showing images

    HI
    Please use small image for mobile.dont use too large images
    Anshu Chauhan
    J2me Developer

  7. #7
    Registered User
    Join Date
    Sep 2009
    Posts
    13

    Re: Problem in showing images

    I tried to show the images which are stored in my mobile.

    The images are such large .


    Ok,so i can't show it as a thumbnail rt..? Since, its too large

  8. #8
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Problem in showing images

    The only way to display a thumbnail would be if you were to write your own JPEG decoder. Then you decompress the image one section at a time, and generate a thumbnail without running out of memory.

    Otherwise, no, handling images of that size in Java is outside the capability of that device.

    Graham.

Similar Threads

  1. Problem in showing scroll bar
    By aamitgupta in forum Symbian
    Replies: 4
    Last Post: 2008-04-14, 14:43
  2. Showing KERN-EXEC3 panic Problem
    By saimram in forum Symbian
    Replies: 1
    Last Post: 2008-02-12, 05:38
  3. problem in showing video on Nokia N72 :((
    By bharatpatel85 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2007-11-21, 15:39
  4. Problem while creating images .
    By sachinwarang in forum Mobile Java General
    Replies: 2
    Last Post: 2006-04-12, 18:42
  5. 3410 problem with images (IllegalArgumentException)
    By bigredswitch in forum Mobile Java General
    Replies: 1
    Last Post: 2002-09-13, 13:21

Posting Permissions

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