Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
1 changed file
with
217 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters