src/formats/geotiff/GeoTiffUtil.js
function (colorSample, bitsPerSample) {
                var multiplier = Math.pow(2, 8 - bitsPerSample);
                return Math.floor((colorSample * multiplier) + (multiplier - 1));
            }
function (colorSample, bitsPerSample) {
                var multiplier = Math.pow(2, 8 - bitsPerSample);
                return Math.floor((colorSample * multiplier) + (multiplier - 1));
            }
function ( colorSample , bitsPerSample ) { var multiplier = Math . pow ( 2 , 8 - bitsPerSample ) ; return Math . floor ( ( colorSample * multiplier ) + ( multiplier - 1 ) ) ; }
Clamp color sample from color sample value and number of bits per sample. Internal use only.
Clamp color sample from color sample value and number of bits per sample . Internal use only .