Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User singhzubin's Avatar
    Join Date
    Aug 2008
    Posts
    19
    Hi has anyone found a solution to: QImage: out of memory, returning null image.


    As a little context, this error occurs when I try to load a bunch of photographs from E:\Image\Camera folder that houses all the photographs taken from a users camera in the N8. I am building an application that displays a photogallery in QML.

    My Application will not show the photographs housed under this folder, it seems it is clogging up phone memory.

    Please advise if there is a solution to fix this.

  2. #2
    Nokia Developer Champion danhicksbyron's Avatar
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209
    The solution is to not use so much memory. It may also help to increase heap size.

    Don't load "a bunch" of large images at once. Load them as you need them and let QPixmapCache do its default thing to manage them..

  3. #3
    Registered User jkauppin's Avatar
    Join Date
    Mar 2003
    Posts
    13
    Symbian 3 seems to run out of mem very fast. It's not bunch of large images but even 4 x VGA size is too much very often.

  4. #4
    Nokia Developer Champion danhicksbyron's Avatar
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209
    If you are loading several pictures to present as a gallery, you can use QImageReader to load them directly in scaled form, vs loading the full resolution form. This saves considerable storage and CPU cycles.

  5. #5
    Nokia Developer Champion kkrish's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,029
    I also found this issue. N8 has 12 MP camera and the images of 12MP camera is more than 2MB in size. you can try to reduce the camera resolution and use those picture. In those less resolution picture you will not get this issue. I think it needs a fix from nokia side.

  6. #6
    Registered User vladest's Avatar
    Join Date
    Apr 2009
    Posts
    506
    Afaik, this because of VG backend, used by QImage under S^3. dunno is this fixed in 4.7.2 or not
    Symbian & Qt developer. http://vladest.org

  7. #7
    Nokia Developer Champion danhicksbyron's Avatar
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209
    A 12MP image, when loaded at full resolution, occupies about 24MB.

  8. #8
    Registered User serngawy's Avatar
    Join Date
    Dec 2010
    Posts
    10
    dose anyone solve this issue I fill sick of this problem, i gone lose my application

  9. #9
    Nokia Developer Champion danhicksbyron's Avatar
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209
    What issue??

  10. #10
    Registered User chriske86's Avatar
    Join Date
    Feb 2010
    Posts
    45
    As danhicksbyron said, you need to use QImageReader.

    This snippet will help how:
    QImage image;
    QImageReader reader(ImagePath);
    reader.setScaledSize(QSize(360,640)); //this will be the readed/converted size of the image
    reader.read(&image);

Similar Threads

  1. iCoeEnv->WsSession() returning NULL?
    By strike_noir in forum Symbian User Interface
    Replies: 8
    Last Post: 2008-11-26, 03:26
  2. CCoeEnv::Static() is returning NULL pointer!
    By gwn-sameer in forum Symbian C++
    Replies: 2
    Last Post: 2007-11-12, 10:05
  3. empty select option is not returning null
    By mobile@123 in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2006-12-28, 21:38

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved