Accept Uint8ClampedArray for image data (#44259)

Co-authored-by: Damian Frizzi <damian.frizzi@truewealth.ch>
This commit is contained in:
damian 2020-04-27 11:27:06 +02:00 committed by GitHub
parent b80a3270ca
commit 1027eb6715
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,15 +2,16 @@
// Project: https://github.com/mapbox/pixelmatch#readme
// Definitions by: Oleg Repin <https://github.com/iamolegga>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Damian Frizzi <https://github.com/damianfrizzi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
declare function Pixelmatch(
/** Image data of the first image to compare. Note: image dimensions must be equal. */
img1: Buffer | Uint8Array,
img1: Buffer | Uint8Array | Uint8ClampedArray,
/** Image data of the second image to compare. Note: image dimensions must be equal. */
img2: Buffer | Uint8Array,
img2: Buffer | Uint8Array | Uint8ClampedArray,
/** Image data to write the diff to, or null if don't need a diff image. */
output: Buffer | Uint8Array | null,
/** Width of the images. Note that all three images need to have the same dimensions. */