@types/omggif
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.2 • Public • Published

    Installation

    npm install --save @types/omggif

    Summary

    This package contains type definitions for omggif (https://github.com/deanm/omggif).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/omggif.

    index.d.ts

    // Type definitions for omggif 1.0
    // Project: https://github.com/deanm/omggif
    // Definitions by: Florian Keller <https://github.com/ffflorian>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    // TypeScript Version: 2.1
    
    /// <reference types="node" />
    
    export interface GifOptions {
        background?: number | undefined;
        loop?: number | undefined;
        palette?: number[] | undefined;
    }
    
    export interface FrameOptions {
        delay?: number | undefined;
        disposal?: number | undefined;
        palette?: number[] | null | undefined;
        transparent?: number | undefined;
    }
    
    export interface Frame {
        data_length: number;
        data_offset: number;
        delay: number;
        disposal: number;
        has_local_palette: boolean;
        height: number;
        interlaced: boolean;
        palette_offset: number | null;
        palette_size: number | null;
        transparent_index: number | null;
        width: number;
        x: number;
        y: number;
    }
    
    export class GifWriter {
        height: number;
        width: number;
    
        constructor(buf: Buffer, width: number, height: number, gopts?: GifOptions);
    
        addFrame(x: number, y: number, w: number, h: number, indexed_pixels: number[], opts?: FrameOptions): number;
        end(): number;
        getOutputBuffer(): Buffer;
        getOutputBufferPosition(): number;
        setOutputBuffer(v: Buffer): void;
        setOutputBufferPosition(v: number): void;
    }
    
    export class GifReader {
        height: number;
        width: number;
    
        constructor(buf: Buffer);
    
        decodeAndBlitFrameBGRA(frame_num: number, pixels: number[] | Uint8Array | Uint8ClampedArray): void;
        decodeAndBlitFrameRGBA(frame_num: number, pixels: number[] | Uint8Array | Uint8ClampedArray): void;
        frameInfo(frame_num: number): Frame;
        loopCount(): number;
        numFrames(): number;
    }

    Additional Details

    • Last updated: Thu, 08 Jul 2021 18:51:46 GMT
    • Dependencies: @types/node
    • Global values: none

    Credits

    These definitions were written by Florian Keller.

    Keywords

    none

    Install

    npm i @types/omggif

    DownloadsWeekly Downloads

    18,679

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    6.16 kB

    Total Files

    4

    Last publish

    Collaborators

    • types