Skip to content
hp-sam edited this page Jul 29, 2014 · 3 revisions

Method

name description
getBase64String():String get image base64 encoding string. jpeg.
getPNGData():bytearray get png encoded data.
getJPEGData(compress:float):bytearray get jpeg encoded data.
getSize():PackedArray get image’s size, return 2 value: width, height.
scale(width:int, height:int):LuaImage scale image with width,height
crop(x:int, y:int, width:int, height:int):LuaImage crop image with x,y,width,height
mask(img:LuaImage):LuaImage mask image with some mask image.
save(path:String, format:String):boolean save image in disk, format can be png or jpeg.
getThumbnail():LuaImage get thumbnail image. (Photo)
getFullScreenImage():LuaImage get image with screen size. (Photo)
getFullResolutionImage():LuaImage get image full size. (Photo)

Clone this wiki locally