2.3.4 • Published 1 year ago
@types/save-pixels v2.3.4
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
// Type definitions for save-pixels 2.3
// Project: https://github.com/mikolalysenko/save-pixels#readme
// Definitions by: Don McCurdy <https://github.com/donmccurdy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <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, 06 Jul 2021 16:34:17 GMT
- Dependencies: @types/ndarray, @types/node
- Global values: none
Credits
These definitions were written by Don McCurdy.