Bug report #10236
layer transparency 'no data value' checkbox setting is not preserved during save/load project
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||18675|
for a geoiff (and probably other raster types) the Layer Properties -> Transparency -> No Data Value checkbox setting is not preserved: uncheck the box, save the project, exit qgis, restart qgis, then load the project, and notice the checkbox is checked. This is important when you want black to be opaque but have other custom pixel values that you want to be transparent. The layers in question do not have an alpha channel.
#6 Updated by Tom Grundy over 7 years ago
Here's a good workaround: just change the nodata value of the geotiff itself to some safe value. In this case, white is meant to be transparent, so:
gdal_edit.py -a_nodata 255 <filename>
So - the bug remains but the workaround is acceptable, unless you have a raster that really has no nodata value, since you can't disable the handling of a nodata value in qgis.