Interface ResizeOptions

Options for resizing an image.

interface ResizeOptions {
    contain?: boolean;
    height?: number;
    output?: string;
    width?: number;
}

Properties

contain?: boolean

Resize to fit within the specified dimensions, maintaining aspect ratio. If both width and height are provided, the smaller dimension is used as the limit.

height?: number

Desired height.

output?: string

Output path for the resized image. If not provided, the original file will be overwritten.

width?: number

Desired width.