Banuba WebAR JavaScript API Reference
    Preparing search index...

    Class Image

    Player input from image

    Supports the same mime-types as img.src

    Be aware about image resolution. Huge images (like 4K UHD and more) may cause out of memory application crash. In this case scale or crop the image before processing.

    Implements

    Index

    Constructors

    Constructors

    • Creates Image input from the given Url

      Parameters

      • source: string

      Returns Image

      const photo = new Image("https://placekitten.com/200/300")
      
    • Creates Image input from the given Blob

      Parameters

      • source: Blob

      Returns Image

      const file = $("#file-input").files[0] // File is subclass of Blob
      const photo = new Image(file)