Installation
npm install --save @types/save-pixels
Summary
This package contains type definitions for save-pixels (https://github.com/mikolalysenko/save-pixels#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/save-pixels.
index.d.ts
/// <reference types="node" />
import { NdArray } from "ndarray";
import * as Stream from "stream";
// Function overloads. Most types return a Stream, except 'canvas'. Quality option only available for
// JPEG format. See https://www.npmjs.com/package/save-pixels#requiresave-pixelsarray-type-options.
declare function savePixels(array: NdArray, type: "png" | "gif"): Stream;
declare function savePixels(array: NdArray, type: "canvas"): HTMLCanvasElement;
declare function savePixels(array: NdArray, type: "jpeg" | "jpg", options?: { quality?: number | undefined }): Stream;
export = savePixels;
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: @types/ndarray, @types/node
Credits
These definitions were written by Don McCurdy.