UNPKG

pixel-utils

Version:
10 lines (9 loc) 396 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = convert_multiband_all_to_string; function convert_multiband_all_to_string(old_no_data_value, noDataPixel, scalefn1, scalefn2, scalefn3, pixel) { if (pixel.includes(old_no_data_value)) return noDataPixel; return `rgba(${scalefn1(pixel[0])}, ${scalefn2(pixel[1])}, ${scalefn3(pixel[2])}, 255)`; }