Options
All
  • Public
  • Public/Protected
  • All
Menu

native-image-diff

Index

Variables

__native_imageDiff

__native_imageDiff: any

Functions

diffImages

  • Compare two images and return the result including meta information and a diff image as a buffer.

    Parameters

    Returns DiffResult

    The information about the difference between the two images.

  • Compare two images and return the result including meta information and a diff image as a buffer.

    Parameters

    Returns DiffResult

    The information about the difference between the two images.

getBytesPerPixel

  • Returns the amount of bytes per pixels for the given image.

    Parameters

    • image: DiffImage

      The image of which the bytes per pixels should be calculated.

    Returns number

    The amount of bytes per pixels for the provided image.

getCommonDimensions

  • Calculate the common dimensions of two images. This will return the maximum width and height of both provided images.

    Parameters

    • image1: DiffImage

      The first image of which to calculate the wdth and height.

    • image2: DiffImage

      The second image of which to calculate the wdth and height.

    Returns Dimensions

    The common maximum dimensions of both images.

isDiffImage

  • isDiffImage(image: any): boolean
  • Checks that the given object is a valid DiffImage.

    see

    DiffImage

    Parameters

    • image: any

    Returns boolean

    Whether the given image is of type DiffImage.

Generated using TypeDoc