Bug report #6561
'cubic' resambling for "zoomed in" (scale > 100%) rasters creates undesired visual glitches with contrast set to stretch to min max
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||all||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||end of life|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||15761|
Steps to reproduce visual glitches:
1. Load a raster; for the sake of this example, please use 1:10m ocean bottom available @ http://www.naturalearthdata.com/downloads/10m-raster-data/10m-ocean-bottom/ as it shows this issue quite well
2. In the layer property window, retrieve the min/max values of RGB bands with these settings:
() cumulative count cut 2 - 98%
() Full (extend)
(*) Estimate (faster) (accurary)
3. Set contrast enhancement to "Stretch to MinMax"
4. Set zoomed in resampling to "Cubic"
5. Apply the change, then zoom in (raster zoom scale must be > 100% to activate cubic resampling) a region of the raster (if using the above ocean bottom raster, glitches easily to spot in southern china sea, among other places)
You'll notice weird visual glitches which are not there if using the two other types of resambling. I'm attaching a screenshot of the problem.
[raster] Fix cubic resampler visual glitches (refs #6561)
Resampler was not correctly bounding color components for premultiplied
image format. There's still errors in the resampled raster at the
source image edges and glitches with transparency channels, though.
Also fix a bunch of inefficiencies in the code.
#2 Updated by Mathieu Pellerin - nIRV about 9 years ago
- File resampling-comparison.jpg added
Marco, I understand the characteristic cubic interpolation, and I believe what is being raised here doesn't fall within expected results of a cubic resampling :)
I'm attaching a new screenshot that compares the three available resampling methods for raster >100%, including the problematic cubic one. It'll hopefully help better demonstrate the issue.
#9 Updated by Giovanni Manghi over 2 years ago
- Resolution set to end of life
- Status changed from Open to Closed
End of life notice: QGIS 2.18 LTR