Enhance image

salah jubeh s_jubeh at YAHOO.COM
Tue Apr 11 12:17:20 EDT 2006


Hi Frank
  
 Thank you for your help , I tried to use the color  ramp but i get exactly the same result, MapServer did not give any  error but the result was the same. 
  
  LAYER
  NAME 'result' 
  DATA 'blue.tif'
  TYPE RASTER
  STATUS ON
  PROCESSING 'SCALE=0,455'
  CLASS 
  STYLE
         COLORRANGE 0 0 0   255 0 0
         DATARANGE 0 100
       END
       
       STYLE
         COLORRANGE 0 0 0   0 255 0
         DATARANGE 101 300
       END
       STYLE
         COLORRANGE 0 0 0   0 0 255
         DATARANGE 301 455
       END   
  END
  END
  
Thanks in advance

  Frank Warmerdam <warmerdam at pobox.com> wrote:  salah jubeh wrote:
> Hi guys,
> I have a problem such that i have 1 band images and these images is 
> unsigned 16, when MapServer create PNG images for viewing , these images 
> are very dark. How can i  enhance there appearance or how can i 
> apply RGB templates on them.

Salah,

You can control how 16bit imagery is scaled to 8bit with the SCALE
PROCESSING options.  The raster data access howto should touch on these.
But for instance if your data has values from 0 to 4000 but the vast
majority of the pixels are in the range 0 to 500 then you might use something
like:

  PROCESSING "SCALE=0,550"

This would stretch input value 0 to black, 550 to white and any values over
550 to white.

However, if you have no scaling options it is likely that that a dark image
indicates a dynamic range mostly well below 255 to start with. In this case
just adding
   PROCESSING "SCALE=AUTO"
may help a lot.

If you want to use a color ramp (rather than just greyscale output) then you
might look into the color range options.  For instance:

LAYER
   NAME grid1
   TYPE raster
   STATUS default
   DATA data/float.tif
   PROCESSING "SCALE=-10,28"
   CLASS
     STYLE
       COLORRANGE 0 0 0   255 0 0
       DATARANGE -10 28
     END
   END
END

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



		
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1&cent;/min.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060411/0101b0ce/attachment.html


More information about the mapserver-users mailing list