mindee
    Preparing search index...

    Function compressImage

    • Compresses an image with the given parameters.

      Parameters

      • imageBuffer: Buffer

        Buffer representation of an image.

      • quality: number = 85

        Quality to apply to the image (JPEG).

      • maxWidth: null | number = null

        Maximum bound for width.

      • maxHeight: null | number = null

        Maximum bound for height.

      Returns Promise<Buffer<ArrayBufferLike>>