2.3.4 • Published 1 year ago

@types/save-pixels v2.3.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

Credits

These definitions were written by Don McCurdy.

2.3.4

1 year ago

2.3.3

1 year ago

2.3.2

3 years ago

2.3.1

4 years ago

2.3.0

4 years ago