Constructor

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

copyPixels (sourceImage:Image, sourceRect:Rectangle, destPoint:Vector2, ?alphaImage:Image, ?alphaPoint:Vector2, mergeAlpha:Bool = false):Void

encode (format:String = "png", quality:Int = 90):Bytes

fillRect (rect:Rectangle, color:Int, ?format:PixelFormat):Void

floodFill (x:Int, y:Int, color:Int, ?format:PixelFormat):Void

getColorBoundsRect (mask:Int, color:Int, findColor:Bool = true, ?format:PixelFormat):Rectangle

getPixel (x:Int, y:Int, ?format:PixelFormat):Int

getPixel32 (x:Int, y:Int, ?format:PixelFormat):Int

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

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

setPixel (x:Int, y:Int, color:Int, ?format:PixelFormat):Void

setPixel32 (x:Int, y:Int, color:Int, ?format:PixelFormat):Void

setPixels (rect:Rectangle, bytePointer:BytePointer, ?format:PixelFormat, ?endian:Endian):Void

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):Image

staticfromBitmapData (bitmapData:Dynamic):Image

Available on Neko, Android, iOS, macOS, Linux, HTML5, Windows

staticfromBitmapData (bitmapData:BitmapData):Image

Available on Flash

staticfromBytes (bytes:Bytes):Image

staticfromCanvas (canvas:Dynamic):Image

Available on Neko, Android, Flash, iOS, macOS, Linux, Windows

staticfromCanvas (canvas:CanvasElement):Image

Available on HTML5

staticfromFile (path:String):Image

staticfromImageElement (image:Dynamic):Image

Available on Neko, Android, Flash, iOS, macOS, Linux, Windows

staticfromImageElement (image:ImageElement):Image

Available on HTML5

staticloadFromBase64 (base64:String, type:String):Future<Image>