Bug report #3733
Dummy transparency and nodata values
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||13792|
Open any raster and go to Transparency tab in layer properties. There is a dummy (incorrect) nodata value and one line with dummy transparent pixels.
Also seems that correct nodata value don't handled by provider.
#1 Updated by Radim Blazek almost 9 years ago
- Assignee deleted (
- Pull Request or Patch supplied set to No
We need at least one nodata value for reprojection (to make transparent areas outside original raster extent). If a raster does not have any nodata value, the provider is using larger data type (for example 16bit instead of original 8bit, because without scanning the whole file we cannot say if all values are used) and sets nodata value, a minimum or maximum value of the data type range, -32768.0, -2147483648.0 or 4294967295.0. This nodata value is only used internally and it should not appear in UI.
Currently we don't have any method / provider member giving info if the nodata value was set by provider or it comes from data. Maybe isNoDataValueValid() could be used for this, because we have now always a nodata value, so it could say if it is internal. But the name of the method would be misleading. Most probably we need a new method/member.
Maybe we just don't have to add nodata value to transparency table by default?