UNPKG

pixel-utils

Version:
17 lines (16 loc) 343 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = select_r_cb; // each row is its own array function select_r_cb(data, depth, r, c) { const pixel = []; const row = data[r]; let i = c * depth; const imax = i + depth; for (; i < imax; i++) { pixel.push(row[i]); } return pixel; }