[mapserver-commits] [mapserver/mapserver] d675ea: Accept LUT with input range in [0, 65535] set

GitHub noreply at github.com
Wed Aug 26 06:14:32 PDT 2015


  Branch: refs/heads/master
  Home:   https://github.com/mapserver/mapserver
  Commit: d675ea2a5c10644f1de557deb2531af2c7fc30e3
      https://github.com/mapserver/mapserver/commit/d675ea2a5c10644f1de557deb2531af2c7fc30e3
  Author: Even Rouault <even.rouault at spatialys.com>
  Date:   2015-08-26 (Wed, 26 Aug 2015)

  Changed paths:
    M mapdrawgdal.c

  Log Message:
  -----------
  Accept LUT with input range in [0,65535] set

Before, if we wanted to use the LUT with 16 bit raster, we had necessary to
use SCALE before, so as to reduce the dynamics to 8 bits, since LUT were only
supported for [0,255]->[0,255] mapping. However, for example in the case of a
12 bit raster where the desired LUT [0,4095]->[0,255] would have segments with
a width of input values < 16, it is not possible to derive a proper 8 bit LUT.

For example, let's assume we want this LUT : 0:0,15:15,4080:240,4095:255
and that the input raster dynamics is effectively [0,4095]. Once we have
rescaled to 8 bits, we cannot "convert" this 12 bit LUT into a 8 bit LUT since
it would become this degenerated LUT: 0:0,0:15,255:240,255:255

Now a LUT like 1605:30,2569:128,3372:200,4095:255 is possible.

Note that the extended LUT is only supported when SCALE is not present. If SCALE
is present, the same behaviour as before will be applied, and input values above
255 will be clamped to 255.




More information about the mapserver-commits mailing list