In MapServer, is there a way to use the PROCESSING "SCALE=AUTO" directive to get dynamic (current extent) contrast stretching with custom colorranges? When I test my mapfile (relevant layer part below) with the Openlayers viewer it gets the desired color ramps but does not do contrast stretching for the current extent. If I take the CLASS'es out the greyscale output is contrast stretched according to current extent. I have tried taking out the EXPRESSIONS and/or the DATARANGES but then it only takes the first COLORRANGE and does not stretch it.
# raster layer LAYER NAME "mapservtest" TYPE RASTER PROCESSING "SCALE=AUTO" STATUS ON DEBUG ON PROJECTION "init=epsg:3857" END METADATA #WMS stuff here END TILEITEM "location" #location is a column in postgis table with varchar of the filepath to each image TILEINDEX "index" FILTER (`[datetime]` = `2015-01-01T00:00:00Z`) OFFSITE 0 0 0 CLASS EXPRESSION ([pixel] >= 25 AND [pixel] < 30) STYLE COLORRANGE "#00ff00" "#0000ff" DATARANGE 25 30 END # STYLE END # CLASS CLASS EXPRESSION ([pixel] < 25) STYLE COLORRANGE "#ff0000" "#00ff00" DATARANGE 20 25 END # STYLE END # CLASS END