QImage: out of memory, returning null image

  • Greetings.

    I'm using QImage in the project I'm working, which works with histological images (images quite large, of 4000 * 3000 pixels).

    I'm constantly creating new images QImage at runtime.
    At one point it generates the following error message:

    "QImage: out of memory, returning null image"

    Did I guess obviously this is because you run out of available memory, or am I wrong?.

    Well my specific questions are:

    1. Where or who (which function) generates this error message ... Is it perhaps the QImage constructor?

    2. Alternative solutions that I have ... How do you approach such problems normally?

    Thanks in advance for any responses and / or comments

  • Moderators

    [quote author="isaacenrique" date="1364839367"]
    "QImage: out of memory, returning null image"
    There is not much to guess about the message. You are right.

    The question is how you are assigning and release memory?
    If you are assigning the memory with new and do not release the memory, you may run out of memory. Which could explain the message.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.