Bug report #3733

Dummy transparency and nodata values

Added by Alexander Bruy over 13 years ago. Updated about 12 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Rasters
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

Description

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.

History

#1 Updated by Radim Blazek almost 13 years ago

  • Assignee deleted (nobody -)
  • 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?

#2 Updated by Giovanni Manghi almost 13 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#3 Updated by Paolo Cavallini over 12 years ago

  • Crashes QGIS or corrupts data set to No
  • Affected QGIS version set to master
  • Target version changed from Version 1.7.4 to Version 1.8.0

#4 Updated by Paolo Cavallini about 12 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#5 Updated by Giovanni Manghi about 12 years ago

  • Operating System deleted (All)
  • Status info deleted (0)
  • Status changed from Open to Closed
  • Resolution set to fixed

Seems ok in the lastest master, please reopen if necessary.

Also available in: Atom PDF