Thanks a lot for your help. I'm loading these in as image items so that users can look at the images side-by-side with synchronized zooming and panning capabilities. I have a single QGraphicsScene that contains all of the pixmap items and a series of QGraphicsViews centered on particular images.
I thought the graphics view framework made the most sense since we will also want to add layers of overlays, icons, and text over the images in the future. Also, though it's not needed for this particular application, I wanted to provide for the future ability to layer the images on top of one another within the same view and allow a user to move them around and hide certain images. So it's for more than just displaying the images.

Originally Posted by
SixDegrees
Your images may only be 700k on disk, but when uncompressed they contain roughly 13 megapixels. Each pixel takes up some space, depending on what sort of image your pixmap is set to receive.
The default is to assume a full color image with an alpha channel, so you wind up claiming roughly 55 megabytes per image. Setting the optional constructor flag 'format' to 'Qt::MonoOnly' will force the image to grayscale, which will only take about 13 megabytes.
That's the best you can do without reducing the image size/resolution. It's impossible to say whether this is an option without knowing more.
Thanks for the insights. I tried using the MonoOnly optimization flag but didn't notice any difference with memory usage:
QPixmap ncpPix
(imgPath,
0, Qt
::MonoOnly);
pixItem->setPixmap(imgPix);
QPixmap ncpPix(imgPath, 0, Qt::MonoOnly);
pixItem->setPixmap(imgPix);
To copy to clipboard, switch view to plain text mode
Bookmarks