Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "image-source"

Contains the ImageSource class, which encapsulates the common abstraction behind a platform specific object (typically a Bitmap) that is used as a source for images.

Index

Functions

fromAsset

fromBase64

  • Creates a new ImageSource instance and loads it from the specified base64 encoded string.

    Parameters

    • source: string

      The base64 encoded string to load the image from.

    Returns ImageSource

fromData

  • Creates a new ImageSource instance and loads it from the specified native image data.

    Parameters

    • data: any

      The native data (byte array) to load the image from. This will be either Stream for Android or NSData for iOS.

    Returns ImageSource

fromFile

fromFileOrResource

  • Creates a new ImageSource instance and loads it from the specified local file or resource (if specified with the "res://" prefix).

    Parameters

    • path: string

      The location of the file on the file system.

    Returns ImageSource

fromNativeSource

  • Creates a new ImageSource instance and sets the provided native source object (typically a Bitmap). The native source object will update either the android or ios properties, depending on the target os.

    Parameters

    • source: any

      The native image object. Will be either a Bitmap for Android or a UIImage for iOS.

    Returns ImageSource

fromResource

fromUrl

  • Deprecated. Use http.getImage(url: string) instead. Downloads the image from the provided Url and creates a new ImageSource instance from it.

    Parameters

    • url: string

      The link to the remote image object. This operation will download and decode the image.

    Returns Promise<ImageSource>

isFileOrResourcePath

  • isFileOrResourcePath(path: string): boolean
  • [Obsolete. Please use utils.isFileOrResourcePath instead!] Returns true if the specified path points to a resource or local file.

    Parameters

    • path: string

      The path.

    Returns boolean

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method