Class ImageProcessor

Methods

  • Applies the given filter to the image. See ParametricFilter for available filters.

    Parameters

    Returns Promise<void>

    Example

    imageProcessor.applyFilter(new sdk.imageFilters.ScanbotBinarizationFilter());
    
  • Crops the image to the given polygon. The polygon is defined by an array of four points, each point being an object with x and y coordinates. Each coordinate is a floating point number between 0 and 1, representing the percentage of the image width and height, respectively.

    Parameters

    Returns Promise<void>

    Example

    // Crop an image to the center 80% of the image:
    imageProcessor.crop([{x: 0.1, y: 0.1}, {x: 0.9, y: 0.1}, {x: 0.9, y: 0.9}, {x: 0.1, y: 0.9}])
  • Returns the processed image as a JPEG encoded ArrayBuffer.

    Returns Promise<ArrayBuffer>

  • Returns Promise<void>

  • Resizes image, keeping aspect ratio, so that the biggest side of the image is equal to destinationSize.

    Parameters

    • destinationSize: number

    Returns Promise<void>

  • Parameters

    Returns Promise<void>

Generated using TypeDoc