View Full Version : Problem reading 32 bit TIFF

1st September 2014, 20:38
Hi all,

I am having some trouble reading a 32 bit satellite image with Qt, and I wish to know if you have any suggestion of what could be going on.

I have a 32 bit satellite image that I read using:

QImage img(filename)

And the image is loaded fine (some tags are ignored, but the image is loaded).

After that, I do.


and I get the dimensions and depth (32) correctly.

Now I need to have access to the pixels values, so I do:

QRgb rgb;

rgb = img.pixels(some x, some y);

and then I do:


but no matter the x,y position, the rgb color values are always 0.

I´ve opened that image using other GIS software (like QGIS, which is based in Qt) and the image opens perfectly.

Do you have any idea what could be going on? I´ve been struggling with it for days and still I don´t know why the image shows no pixel values.
I´ve tried the same code using other TIF images and it works fine.


P.S. Excuse my english.