Hierarchy (view full)

Properties

uniqueId?: string

Accessors

  • get buffer(): undefined | string
  • Returns undefined | string

Methods

  • Releases native resources stored by the ref. If two different ImageRef objects have the same uniqueId both of them become cleared. If uniqueId is not set or the image is already released, an exception will be thrown.

    Returns Promise<void>

  • Creates a deep copy of the image. If uniqueId is not set or the image is already released, an exception will be thrown.

    Returns Promise<null | ImageRef>

  • Returns the stored image as base64.

    Parameters

    Returns Promise<null | string>

  • Encode image.

    Returns Promise<void>

  • Compresses ImageRef and stores it either on disk or in memory according to global settings. If uniqueId is not set or the image is already released, an exception will be thrown.

    Returns Promise<void>

  • Information about stored image as reference. If uniqueId is not set or the image is already released, an exception will be thrown.

    Returns Promise<null | ImageInfo>

  • Releases strong reference to the image. If uniqueId to the image is not set, an exception will be thrown.

    Returns void

  • Saves the stored image with the given options. If uniqueId is not set or the image is already released, an exception will be thrown.

    Parameters

    Returns Promise<boolean>

  • Parameters

    • source: {
          buffer: undefined | string;
          uniqueId?: string;
          clear?: any;
          clone?: any;
          encodeImage?: any;
          encodeInPlace?: any;
          hibernate?: any;
          info?: any;
          isRetained?: any;
          release?: any;
          retain?: any;
          saveImage?: any;
          serialize?: any;
      }
      • buffer: undefined | string
      • Optional Readonly uniqueId?: string

    Returns ImageRef

  • Parameters

    • serializedRef: {
          buffer: undefined | string;
          uniqueId?: string;
          clear?: any;
          clone?: any;
          encodeImage?: any;
          encodeInPlace?: any;
          hibernate?: any;
          info?: any;
          isRetained?: any;
          release?: any;
          retain?: any;
          saveImage?: any;
          serialize?: any;
      }
      • buffer: undefined | string
      • Optional Readonly uniqueId?: string

    Returns ImageRef

  • Creates ImageRef with uniqueId from base64 encoded buffer, e.g. from jpeg.

    Parameters

    Returns Promise<null | ImageRef>

  • Creates ImageRef with uniqueId from the path to an image.

    Parameters

    Returns Promise<null | ImageRef>

  • Returns a snapshot of all alive ImageRefs. The snapshot contains a list of ImageRefs with information such as in-memory size.

    Returns Promise<null | ImageRefPoolSnapshot>

  • Releases all alive images despite any existing references.

    Returns void