×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Aug 2006
    Location
    Karachi, Pakistan
    Posts
    33

    Question loading 1.3 or 2 Megapixel images memory problem in 7370 (S40)

    Hi,

    I am trying to load jpeg image of about 1.3 to 2.0 Mega pixel image which is causing me a memory problem, so does any body have the solution of that???

    Kind Regards

    Muhammad Mutahar Alam.

  2. #2
    Registered User
    Join Date
    Aug 2006
    Location
    Karachi, Pakistan
    Posts
    33

    Question Clarification

    Hi,

    I am able to load the jpeg image of 800 x 600 but I want to load images of 1600 x 1200 when I try to do so it gives me Out of memory error, the strange thing I noticed that before execution of createImage(inputStream) (as I am loading the image from input stream) statement free memory was 1.96 MB and a 1600 x 1200 image requires about 1.83 MB.

    One more thing I want to discuss that I am even unable to load the image of 820 x 615,it still gives me the Out of memory error.

    Now does any body have solution for that?

    Kind Regards,

    Muhammad Mutahar Alam.

  3. #3
    Super Contributor
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: Clarification

    well, i think your mistake is that you consider that your image should be 8-bit.
    an image of x*y pixels is x*y*4 (with alpha processing) bytes.
    800x600x4 = 1.83MiBi = 1.96MB
    anything bigger may cause OutOfMemoryError.
    Some devices have separated memory for image handling, but i can't remember which.
    I have 2 suggestions : 1st : cut your images /a priori/
    2nd : if you can't, implement a jpg decoder to catch only a part of your image

  4. #4
    Registered User
    Join Date
    Aug 2006
    Location
    Karachi, Pakistan
    Posts
    33

    Re: Clarification

    Hi,

    Is there any native api available for midlets so that we could easily open a 2Mega Pixel Image. actually the Image Class with the SDk does not support more than 1 Mega Pixel Image.

    Plus it would be a greate help if you could point me out a JPEG Decoder that handles big images smartly and fastly.


    Thanks In advance....

    Kind regards

    Muhammad Mutahar Alam.

Similar Threads

  1. oading too big images in a multithreaded setting - safe or not?
    By uttumuttu in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-08-06, 15:27
  2. Replies: 0
    Last Post: 2004-07-26, 22:46
  3. can not successfully link any sample using .NET
    By lobotomat in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-08-20, 00:29
  4. 7650: Problem in memory PhoneBook
    By raguso in forum Digital Rights Management & Content Downloading
    Replies: 0
    Last Post: 2002-07-25, 06:58
  5. Internet : Memory Problem
    By raj_vijayarajan in forum Symbian
    Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

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