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

5.0.3 • Public • Published

Installation

npm install --save @types/jpeg-autorotate

Summary

This package contains type definitions for jpeg-autorotate (https://github.com/johansatge/jpeg-autorotate#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jpeg-autorotate.

index.d.ts

/// <reference types="node" />

export enum errors {
    read_file = "read_file",
    read_exif = "read_exif",
    no_orientation = "no_orientation",
    unknown_orientation = "unknown_orientation",
    correct_orientation = "correct_orientation",
    rotate_file = "rotate_file",
}

export interface CustomError extends Error {
    code: errors;
}

export interface RotateOptions {
    quality?: number | undefined;
}

export interface RotateDimensions {
    height: number;
    width: number;
}

export function rotate(
    path_or_buffer: string | Buffer,
    options: RotateOptions,
): Promise<{
    buffer: Buffer;
    orientation: number;
    dimensions: RotateDimensions;
    quality: number;
}>;

export function rotate(
    path_or_buffer: string | Buffer,
    options: RotateOptions,
    module_callback?: (
        error: CustomError | null,
        buffer: Buffer,
        orientation: number | null,
        dimensions: RotateDimensions | null,
        quality: number | null,
    ) => void,
): void;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Slessi.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/jpeg-autorotate

Weekly Downloads

2,067

Version

5.0.3

License

MIT

Unpacked Size

4.69 kB

Total Files

5

Last publish

Collaborators

  • types