Skip to content

io/image

Documentation

Overview

Classes

Image

resize()

Resizes an image contained within an InputStream to the specified dimensions.

ts
static resize(original: InputStream, type: string, width: number, height: number): InputStream;
ParameterTypeDescription
originalInputStreamThe InputStream containing the original image data.
typestringThe target format of the resized image (e.g., "png", "jpeg", "gif").
widthnumberThe target width in pixels.
heightnumberThe target height in pixels.

Returns

  • Type: InputStream
  • Description: A new InputStream containing the resized image data in the specified format.