Results 1 to 2 of 2

Thread: QImage: out of memory, returning null image

  1. #1
    Join Date
    Dec 2010
    Qt products
    Windows Symbian S60

    Default QImage: out of memory, returning null image

    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
    Join Date
    Jan 2006
    Munich, Germany
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Unix/X11 Windows

    Default Re: QImage: out of memory, returning null image

    This is probably a problem in your code.
    Please post the code responsible for loading the images.

    Wait - if you are loading ALL the images in a directory at once, with a smart phone you can very well get out of memory.
    You should do smart loading, only loading as many images as you can show at any given time (maybe a bit more so scrolling will be smooth.
    Last edited by high_flyer; 10th December 2010 at 08:42.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Image: out of memory, returning null image
    By darek_hecpl in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 22nd September 2010, 13:48
  2. IplImage to QImage memory issue
    By p3l-outrepid in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2010, 09:35
  3. zoomRectangle returning null
    By Raghaw in forum Qwt
    Replies: 0
    Last Post: 3rd November 2009, 12:52
  4. SelectFile() is returning NULL
    By abhilashajha in forum Qt Programming
    Replies: 6
    Last Post: 10th June 2009, 11:30
  5. Replies: 3
    Last Post: 15th March 2006, 11:44


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.