Constructor

@:value({ type : null, color : null, height : -1, width : -1, offsetY : 0, offsetX : 0, buffer : null })new(?buffer:ImageBuffer, offsetX:Int = 0, offsetY:Int = 0, width:Int = -1, height:Int = -1, ?color:Int, ?type:ImageType)

Variables

Methods

copyChannel(sourceImage:Image, sourceRect:Rectangle, destPoint:Vector2, sourceChannel:ImageChannel, destChannel:ImageChannel):Void

@:value({ mergeAlpha : false, alphaPoint : null, alphaImage : null })copyPixels(sourceImage:Image, sourceRect:Rectangle, destPoint:Vector2, ?alphaImage:Image, ?alphaPoint:Vector2, mergeAlpha:Bool = false):Void

@:value({ quality : 90, format : "png" })encode(format:String = "png", quality:Int = 90):Bytes

@:value({ format : null })fillRect(rect:Rectangle, color:Int, ?format:PixelFormat):Void

@:value({ format : null })floodFill(x:Int, y:Int, color:Int, ?format:PixelFormat):Void

@:value({ format : null, findColor : true })getColorBoundsRect(mask:Int, color:Int, findColor:Bool = true, ?format:PixelFormat):Rectangle

@:value({ format : null })getPixel(x:Int, y:Int, ?format:PixelFormat):Int

@:value({ format : null })getPixel32(x:Int, y:Int, ?format:PixelFormat):Int

@:value({ format : null })getPixels(rect:Rectangle, ?format:PixelFormat):Bytes

merge(sourceImage:Image, sourceRect:Rectangle, destPoint:Vector2, redMultiplier:Int, greenMultiplier:Int, blueMultiplier:Int, alphaMultiplier:Int):Void

resize(newWidth:Int, newHeight:Int):Void

@:value({ format : null })setPixel(x:Int, y:Int, color:Int, ?format:PixelFormat):Void

@:value({ format : null })setPixel32(x:Int, y:Int, color:Int, ?format:PixelFormat):Void

@:value({ format : null })setPixels(rect:Rectangle, bytes:Bytes, ?format:PixelFormat):Void

@:value({ format : null, copySource : false, mask : 0xFFFFFFFF, color : 0x00000000 })threshold(sourceImage:Image, sourceRect:Rectangle, destPoint:Vector2, operation:String, threshold:Int, color:Int = 0x00000000, mask:Int = 0xFFFFFFFF, copySource:Bool = false, ?format:PixelFormat):Int

Static methods

staticfromBase64(base64:String, type:String, onload:Image‑>Void):Image

staticfromBitmapData(bitmapData:BitmapData):Image

@:value({ onload : null })staticfromBytes(bytes:Bytes, ?onload:Image‑>Void):Image

staticfromCanvas(canvas:Dynamic):Image

@:value({ onerror : null, onload : null })staticfromFile(path:String, ?onload:Image‑>Void, ?onerror:Void‑>Void):Image