Bug report #10236

layer transparency 'no data value' checkbox setting is not preserved during save/load project

Added by Tom Grundy almost 10 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Project Loading/Saving
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

Description

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.


Related issues

Duplicated by QGIS Application - Bug report #10668: raster layer transparency 'no data value' checkbox is ign... Closed 2014-06-21

History

#1 Updated by Giovanni Manghi almost 10 years ago

  • Target version changed from Version 2.2 to Version 2.4
  • Operating System deleted (Windows)
  • OS version deleted (Vista 32 home basic)
  • Affected QGIS version changed from 2.2.0 to master

Confirmed on master/linux.

#2 Updated by Etienne Tourigny almost 10 years ago

Actually I am not sure if the no data value settings (and additional nodata value) should be saved in the project, but rather in the .qml file.

#3 Updated by Etienne Tourigny almost 10 years ago

  • Status changed from Open to Closed

#4 Updated by Tom Grundy almost 10 years ago

  • Status changed from Closed to Reopened

please reopen - bug fix seems to be broken - see issue #10668

#5 Updated by Tom Grundy almost 10 years ago

I can confirm that the 'new' bug still exists in QGIS 422148c (just installed)

#6 Updated by Tom Grundy almost 10 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>

documented here

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.

#7 Updated by Jürgen Fischer almost 10 years ago

  • Target version changed from Version 2.4 to Future Release - High Priority

#8 Updated by Alexander Bruy over 8 years ago

  • Resolution set to fixed/implemented
  • Status changed from Reopened to Closed

Seems fixed in master. Please reopen if necessary

Also available in: Atom PDF