[QGIS-trac] Re: [Quantum GIS] #1643: Raster: Problems displaying Int16 grayscale image

Quantum GIS qgis at qgis.org
Tue Jul 28 03:13:08 EDT 2009


#1643: Raster: Problems displaying Int16 grayscale image
-------------------------------------+--------------------------------------
        Reporter:  timlinux          |         Owner:  ersts        
            Type:  bug               |        Status:  assigned     
        Priority:  minor: annoyance  |     Milestone:  Version 1.0.3
       Component:  Rasters           |       Version:  HEAD         
      Resolution:                    |      Keywords:  raster black 
Platform_version:                    |      Platform:  Debian       
        Must_fix:  No                |   Status_info:  0            
-------------------------------------+--------------------------------------
Comment (by mgrizonnet):

 Hi,

 in attachment the gdalinfo log of my example which produce a black image
 (file : gdalinfo_qb_road_extract.log).

 Best regards.

 Manuel
 Replying to [comment:6 ersts]:
 > Can someone post me the output from gdalinfo on an image they are having
 problems with? Also please let me know how the U16Bit image was created.
 >
 > I can get a similar type of behaviour when I convert at 32-bit image
 with values from 0.0 to 1.0 and a no data value of -9999.0 with the
 following command
 >
 > gdal_translate -ot UInt16 -of GTiff -scale 0 1 B1.asc B1_3.tif
 >
 > It is all black image and stretching appears to does little, but if I
 use
 >
 > gdal_translate -ot Byte -of GTiff -scale 0 1 B1.asc B1_3.tif
 >
 > It get something that "looks" more correct, but still is not actually.
 The problem is that gdal seems to be changing the no data value to 0 even
 when I explicitly set it to something else and if the image has a bunch of
 no data values, 0 dominates the stretch.

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/1643#comment:7>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list