Bug report #5850
Problems with raster transparency
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||15319|
A 1-band (GDT_Float32 - Thirty two bit floating point) GeoTIFF raster file is rendered as 'singleband gray'.
(1) In the 'Transparency' tab of raster properties there is a button called 'Default values'.
Click on that button. This results in the table header to be filled with "red, green, blue, Percent transparent" instead of "Gray, Percent transparent".
Close the properties window and open it again, the correct header is then displayed.
(2) Same raster, same wrong table header after clicking 'Default values'. Now type in a RBG colour code to set it transparent: 128, 128, 128, 100 (it is a grey shade after all).
After clicking on 'Apply' the green component changes to 0 (128, 0, 128, 100) and there is no effect on the displayed raster.
(3) The min/max values of the raster are: -0.5984/0.9996 respectively and the no-data-value is -9999.0
There is no way to make the no-data-value transparent and to display the raster in greyscale. The no-data-value is always displayed in black and the raster in uniform grey, whatever the 'Contrast enhancement' used (BTW, the 'Load min/-max values' is set to 'Actual (slower)' and the 'Load' button is clicked to load the correct min/max values).
Very similar to Bug #5847.
#3 Updated by Benoit de Cabissole about 8 years ago
Just to add an oddity for point (3) above.
The no-data-value is generally -9999 in my rasters and they are all FLOAT32.
As said above, the no-data-value is not rendered as transparent, it is sometimes black, some other times another colour.
If I add the no-data-value to the 'Transparent pixel list' and click 'Apply', nothing happens.
But, if I then move a little bit the 'Global transparency' slider and click 'Apply', boom, the no-data-value is effectively transparent!
Then, I save the project and reload it. The no-data-value is again displayed in a solid colour (non-transparent) and the "slider trick" is again necessary to display the no-data-value as transparent...
#4 Updated by Giovanni Manghi about 8 years ago
- Status changed from Open to Feedback
Benoit de Cabissole wrote:
From OSGeo4W Quantum QGIS 1.9.0-master, QGIS code revision: 02b1324.
this used to work ok in qgis 1.7.4 (and works fine in 1.8?)?
if yes then assign this ticket to Marco H., this can be a consequence of the merge of the "resampling" branch.