UNPKG

image-js

Version:

Image processing and manipulation in JavaScript

19 lines (17 loc) 342 B
/** * @memberof Stack * @instance * @return {number[]} */ export default function max() { this.checkProcessable('min', { bitDepth: [8, 16], }); let max = this[0].max; for (let i = 1; i < this.length; i++) { for (let j = 0; j < max.length; j++) { max[j] = Math.max(max[j], this[i].max[j]); } } return max; }