UNPKG

pixel-utils

Version:
6 lines 302 B
// convert a 2-band pixel // if any no data is found, set all RGB to no data export default function convert_double_all(old_no_data_value, noDataPixel, scalefn1, scalefn2, pixel) { if (pixel.includes(old_no_data_value)) return noDataPixel; return [scalefn1(pixel[0]), scalefn2(pixel[1]), 0, 255]; }