Constructor

new(app:Clay)

Methods

@:value({ pot : true })decodePngWithPngjs(bytes:Uint8Array, pot:Bool = true):Image

@:value({ pot : true })decodeImageFromElement(elem:ImageElement, pot:Bool = true):Image

Create an image info (padded to POT) from a given Canvas or Image element.

@:value({ pot : true, components : 4 })imageFromBytes(bytes:Uint8Array, ext:String, components:Int = 4, pot:Bool = true, ?callback:(image:Image) ‑> Void):Image

@:value({ pot : true, components : 4 })imageFromBytesUsingImageElement(bytes:Uint8Array, ext:String, components:Int = 4, pot:Bool = true, ?callback:(image:Image) ‑> Void):Image

pixelsToPngData(width:Int, height:Int, pixels:Uint8Array, ?callback:(data:Uint8Array) ‑> Void):Void

Return PNG data from the given pixels

paddedBytesFromPixels(width:Int, height:Int, widthPadded:Int, heightPadded:Int, source:Uint8Array):Uint8Array

Return a padded array of bytes from raw image pixels

paddedBytesFromElement(width:Int, height:Int, widthPadded:Int, heightPadded:Int, source:ImageElement):Uint8Array

Return a padded array of bytes from an image/canvas element.

Inherited Variables

Defined by BaseAssets

read onlyapp:Clay

Clay app

Inherited Methods

Defined by BaseAssets