capacitor-plugin-scanbot-sdk
    Preparing search index...

    Variable ScanbotImageProcessorConst

    ScanbotImageProcessor: {
        applyFilters(
            params: { filters: ParametricFilter[]; image: ImageRef },
        ): Promise<ImageRef>;
        applyFiltersOnImageFile(
            params: {
                filters: ParametricFilter[];
                imageFileUri: string;
                overwrite?: boolean;
                saveOptions?: SaveImageOptions;
            },
        ): Promise<string>;
        crop(params: { image: ImageRef; polygon: Point[] }): Promise<ImageRef>;
        cropImageFile(
            params: {
                imageFileUri: string;
                overwrite?: boolean;
                polygon: Point[];
                saveOptions?: SaveImageOptions;
            },
        ): Promise<string>;
        readImageData(imageFileUri: string): Promise<string>;
        resize(params: { image: ImageRef; maxSize: number }): Promise<ImageRef>;
        resizeImageFile(
            params: {
                imageFileUri: string;
                maxSize: number;
                overwrite?: boolean;
                saveOptions?: SaveImageOptions;
            },
        ): Promise<string>;
        rotate(
            params: { image: ImageRef; rotation: ImageRotation },
        ): Promise<ImageRef>;
        rotateImageFile(
            params: {
                imageFileUri: string;
                overwrite?: boolean;
                rotation: ImageRotation;
                saveOptions?: SaveImageOptions;
            },
        ): Promise<string>;
    }

    Entry point for all image processing features.

    Type Declaration

    • applyFilters: function
    • applyFiltersOnImageFile: function
      • Applies the given filters on the image.

        Parameters

        • params: {
              filters: ParametricFilter[];
              imageFileUri: string;
              overwrite?: boolean;
              saveOptions?: SaveImageOptions;
          }
          • filters: ParametricFilter[]

            List of filters to be applied on the image.

          • imageFileUri: string

            File uri of the image to be processed.

          • Optionaloverwrite?: boolean

            Whether to overwrite the original image file or create a new file. Default is false

          • OptionalsaveOptions?: SaveImageOptions

            Options for saving the image.

        Returns Promise<string>

        • File uri of the image with applied filters.
    • crop: function
      • Crops the image to the given polygon area.

        Parameters

        • params: { image: ImageRef; polygon: Point[] }
          • image: ImageRef

            Reference of the image to be cropped.

          • polygon: Point[]

            Polygon defining the area to be cropped. Points needs to be represented in percentage values (0.0 - 1.0) and the order should be top-left, top-right, bottom-right, bottom-left.

        Returns Promise<ImageRef>

        • Reference of the cropped image.
    • cropImageFile: function
      • Crops the image to the given polygon area.

        Parameters

        • params: {
              imageFileUri: string;
              overwrite?: boolean;
              polygon: Point[];
              saveOptions?: SaveImageOptions;
          }
          • imageFileUri: string

            File uri of the image to be cropped.

          • Optionaloverwrite?: boolean

            Whether to overwrite the original image file or create a new file. Default is false

          • polygon: Point[]

            Polygon defining the area to be cropped. Points needs to be represented in percentage values (0.0 - 1.0) and the order should be top-left, top-right, bottom-right, bottom-left.

          • OptionalsaveOptions?: SaveImageOptions

            Options for saving the image.

        Returns Promise<string>

        • File uri of the cropped image.
    • readImageData: function
      • Reads image data from the given file uri and returns it as a Base 64 encoded string.

        Parameters

        • imageFileUri: string

          File uri of the image to be read.

        Returns Promise<string>

        • The Base 64 encoded representation of the image.
    • resize: function
      • Resizes the image to fit within the given maximum size for the longest edge.

        Parameters

        • params: { image: ImageRef; maxSize: number }
          • image: ImageRef

            Reference of the image to be resized.

          • maxSize: number

            Maximum size for the longest edge of the image.

        Returns Promise<ImageRef>

        • Reference of the resized image.
    • resizeImageFile: function
      • Resizes the image to fit within the given maximum size for the longest edge.

        Parameters

        • params: {
              imageFileUri: string;
              maxSize: number;
              overwrite?: boolean;
              saveOptions?: SaveImageOptions;
          }
          • imageFileUri: string

            File uri of the image to be resized.

          • maxSize: number

            Maximum size for the longest edge of the image.

          • Optionaloverwrite?: boolean

            Whether to overwrite the original image file or create a new file. Default is false

          • OptionalsaveOptions?: SaveImageOptions

            Options for saving the image.

        Returns Promise<string>

        • File uri of the resized image.
    • rotate: function
      • Rotates the image by the given rotation degree. This methods must be wrapped inside an autorelease pool.

        Parameters

        Returns Promise<ImageRef>

        • Reference of the rotated image.
    • rotateImageFile: function
      • Rotates the image by the given rotation degree.

        Parameters

        • params: {
              imageFileUri: string;
              overwrite?: boolean;
              rotation: ImageRotation;
              saveOptions?: SaveImageOptions;
          }
          • imageFileUri: string

            File uri of the image to be rotated.

          • Optionaloverwrite?: boolean

            Whether to overwrite the original image file or create a new file. Default is false

          • rotation: ImageRotation

            Rotation degree.

          • OptionalsaveOptions?: SaveImageOptions

            Options for saving the image.

        Returns Promise<string>

        • File uri of the rotated image.