Results 1 to 2 of 2

Thread: QImage: out of memory, returning null image

  1. #1
    Join Date
    Dec 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    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
    Location
    Munich, Germany
    Posts
    4,716
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    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.

    EDIT:
    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 09:42.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    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, 14:48
  2. IplImage to QImage memory issue
    By p3l-outrepid in forum Qt Programming
    Replies: 1
    Last Post: 12th May 2010, 10:35
  3. zoomRectangle returning null
    By Raghaw in forum Qwt
    Replies: 0
    Last Post: 3rd November 2009, 13:52
  4. SelectFile() is returning NULL
    By abhilashajha in forum Qt Programming
    Replies: 6
    Last Post: 10th June 2009, 12:30
  5. Replies: 3
    Last Post: 15th March 2006, 12:44

Bookmarks

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.