PDA

View Full Version : QImageReader and High Resolution pictures



SABROG
19th April 2009, 09:30
I have about 2Gb National Geographics Maps http://www.google.com/search?q=National+Geographic+Maps
with high resoulution. I want create scroller with QGraphicsScene/paintEvent and i don't wan't to load whole image to memory. How i can read images like a QTextStream pixel by pixel from HDD without knowing a format file? We need a streaming for pixels.

wysota
19th April 2009, 10:08
You'd have to create your own image format plugin. You can then read the data frame by frame.

SABROG
19th April 2009, 10:18
But for this i must know picture format (BMP, JPEG, PNG, TIFF etc) or i can use Qt features for this?

wysota
19th April 2009, 11:48
Yes, you have to know the image format. If you're able to tell where an image starts or ends, you can use a different approach - use QImage::loadFromData() and point it to the data containing a single image (header included).

SABROG
19th April 2009, 19:11
If you're able to tell where an image starts or ends, you can use a different approach - use QImage::loadFromData() and point it to the data containing a single image (header included).

I can set only size, there is no start or end parameters. May be i can generate buffer with header and partial data, but diffirent formats have diffirent size of header and header itself.

I try to compile ImageMagick with MinGW, but program crashed with exceptions inside IM dll.

wysota
23rd April 2009, 20:05
I'm not sure in what way would ImageMagick be helpful to you.