Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Image

The Image class represents generic image data

Hierarchy

  • Image

Index

Constructors

Properties

Accessors

Constructors

constructor

  • new Image(width: number, height: number, data: any, channels: number, pixelDensity?: { scaleX: number; scaleY: number }): Image
  • Image class constructor

    Parameters

    • width: number

      Image width in pixels

    • height: number

      Image height in pixels

    • data: any

      Generic Image data

    • channels: number

      Amount of Image channels

    • Default value pixelDensity: { scaleX: number; scaleY: number } = {scaleX: 1.0,scaleY: 1.0,}

      Object containing scale info to work with e.g. Retina display data where the reported display size and pixel size differ (Default: {scaleX: 1.0, scaleY: 1.0})

      • scaleX: number
      • scaleY: number

    Returns Image

Properties

Readonly channels

channels: number

Amount of Image channels

Readonly data

data: any

Generic Image data

Readonly height

height: number

Image height in pixels

Readonly pixelDensity

pixelDensity: { scaleX: number; scaleY: number }

Object containing scale info to work with e.g. Retina display data where the reported display size and pixel size differ (Default: {scaleX: 1.0, scaleY: 1.0})

Type declaration

  • scaleX: number
  • scaleY: number

Readonly width

width: number

Image width in pixels

Accessors

hasAlphaChannel

  • get hasAlphaChannel(): boolean