class lime.graphics.Image

Available on all platforms

Class Fields

static function fromBase64(base64:String, type:String, onload:Image ->Void):Image

static function fromBitmapData(bitmapData:Dynamic):Image

static function fromBytes(bytes:ByteArray, ?onload:Image ->Void = null):Image

static function fromCanvas(canvas:Dynamic):Image

static function fromFile(path:String, ?onload:Image ->Void = null?onerror:Void ->Void = null):Image

static function fromImageElement(image:Dynamic):Image

Instance Fields

var x:Float

var y:Float

function new(?buffer:ImageBuffer = null, ?offsetX:Int = 0, ?offsetY:Int = 0, ?width:Int = -1, ?height:Int = -1, ?color:Int = null, ?type:ImageType = null):Void

function clone():Image

function colorTransform(rect:Rectangle, colorMatrix:ColorMatrix):Void

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

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

function encode(?format:String = 'png', ?quality:Int = 90):ByteArray

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

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

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

function getPixel(x:Int, y:Int, ?format:PixelFormat = null):Int

function getPixel32(x:Int, y:Int, ?format:PixelFormat = null):Int

function getPixels(rect:Rectangle, ?format:PixelFormat = null):ByteArray

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

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

function scroll(x:Int, y:Int):Void

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

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

function setPixels(rect:Rectangle, byteArray:ByteArray, ?format:PixelFormat = null):Void