Bug report #1055

Contrast Enhancement defaults to Stretch to MinMax causing raster color shifts

Added by starriver - over 16 years ago. Updated about 15 years ago.

Status:Closed
Priority:Low
Assignee:ersts -
Category:Rasters
Affected QGIS version: Regression?:No
Operating System:OS X Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11115

Description

When adding a raster layer, Raster Layer Properties>Symbology>Contrast Enhancement defaults to Stretch to MinMax and seems to stretch the colors based on the min max values in the bands. This happens with Custom Min Max Values not selected and without having selected Load Min Max Values From Band(s).

In effect the system attempts, without being asked, to do a custom white balance on each added raster layer. The results can be quite strange with otherwise matched raster tiles.

Please set the default to No Stretch or at least include a preference that would allow the user to make No Stretch the default.

This may be the same underlying phenomenon described in ticket #996 where the colors of JPEG2000 files are changed dramatically.

Let me know if I can further clarify this issue.

History

#1 Updated by ersts - over 16 years ago

  • Status changed from Open to In Progress

When contrast enhancements were reintroduced the default was "No Stretch" but there was a rather strong opposition to it, especially for 'newer' users, so the default was changed to "min max".

There are definitely two camps, those who want min max to be default and those who don't. I can agree with both sides and have been thinking it should changeable as suggested in this ticket.

I we will keep the default as "Min Max" and add an option in the raster properties to set which stretch is default and store that as a QSettings variable so it is persistent between qgis sessions.

#2 Updated by starriver - over 16 years ago

Thanks for picking this up. A QSettings option as you describe would work well for my needs.

#3 Updated by ersts - over 16 years ago

  • Resolution set to fixed
  • Status changed from In Progress to Closed

Next to the contrast enhancement pull down, there is a button that will set the default contrast enhancement to the currently select enhancement -- This is persistent between sessions.

#4 Updated by dmorissette - about 15 years ago

I understand the argument from both camps and won't argue with your choice of going with MinMax, but at the moment, with a brand new installation of QGIS, before you ever use the little disk icon (save default) for the first time, the dialog picks "Stretch to MinMax" by default in the drop-down, but says "Default No Stretch" just under it. This can be misleading for users.

Should you not change the default "Default" value displayed just below the contrast enhancement drop-down to say "Stretch to MinMax" instead of "No Stretch", just to be consistent and really reflect what the real default is?

Also available in: Atom PDF