UNPKG

pixel-utils

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