5.0.3 • Published 6 months ago

@types/jpeg-autorotate v5.0.3

Weekly downloads
1,311
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for jpeg-autorotate 5.0
// Project: https://github.com/johansatge/jpeg-autorotate#readme
// Definitions by: Slessi <https://github.com/Slessi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4

/// <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: Thu, 08 Jul 2021 14:23:37 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Slessi.

5.0.3

6 months ago

5.0.2

7 months ago

5.0.1

3 years ago

5.0.0

5 years ago

4.0.0

5 years ago