kvision / pl.treksoft.kvision.electron / NativeImage

NativeImage

open external class NativeImage

Constructors

<init>

NativeImage()

Functions

addRepresentation

open fun addRepresentation(options: AddRepresentationOptions): Unit

crop

open fun crop(rect: Rectangle): NativeImage

getAspectRatio

open fun getAspectRatio(): Number

getBitmap

open fun getBitmap(options: BitmapOptions? = definedExternally): <ERROR CLASS>

getNativeHandle

open fun getNativeHandle(): <ERROR CLASS>

getSize

open fun getSize(): Size

isEmpty

open fun isEmpty(): Boolean

isTemplateImage

open fun isTemplateImage(): Boolean

resize

open fun resize(options: ResizeOptions): NativeImage

setTemplateImage

open fun setTemplateImage(option: Boolean): Unit

toBitmap

open fun toBitmap(options: ToBitmapOptions? = definedExternally): <ERROR CLASS>

toDataURL

open fun toDataURL(options: ToDataURLOptions? = definedExternally): String

toJPEG

open fun toJPEG(quality: Number): <ERROR CLASS>

toPNG

open fun toPNG(options: ToPNGOptions? = definedExternally): <ERROR CLASS>

Companion Object Functions

createEmpty

fun createEmpty(): NativeImage

createFromBuffer

fun createFromBuffer(buffer: <ERROR CLASS>, options: CreateFromBufferOptions? = definedExternally): NativeImage

createFromDataURL

fun createFromDataURL(dataURL: String): NativeImage

createFromNamedImage

fun createFromNamedImage(imageName: String, hslShift: Array<Number>): NativeImage

createFromPath

fun createFromPath(path: String): NativeImage

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.