UNPKG

pixel-utils

Version:
11 lines (10 loc) 343 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = convert_raw_one_band_pixel_to_rgb; function convert_raw_one_band_pixel_to_rgb(noDataValue, noDataPixel, scale, pixel) { if (pixel.includes(noDataValue)) return noDataPixel; const scaled = scale(pixel[0]); return [scaled, scaled, scaled]; }