kvision / pl.treksoft.kvision.electron / NativeImage

NativeImage

(js) open class NativeImage

Constructors

(js)

<init>

NativeImage()

Functions

(js)

addRepresentation

open fun addRepresentation(options: AddRepresentationOptions): Unit
(js)

crop

open fun crop(rect: Rectangle): NativeImage
(js)

getAspectRatio

open fun getAspectRatio(): Number
(js)

getBitmap

open fun getBitmap(options: BitmapOptions? = definedExternally): Buffer
(js)

getNativeHandle

open fun getNativeHandle(): Buffer
(js)

getSize

open fun getSize(): Size
(js)

isEmpty

open fun isEmpty(): Boolean
(js)

isTemplateImage

open fun isTemplateImage(): Boolean
(js)

resize

open fun resize(options: ResizeOptions): NativeImage
(js)

setTemplateImage

open fun setTemplateImage(option: Boolean): Unit
(js)

toBitmap

open fun toBitmap(options: ToBitmapOptions? = definedExternally): Buffer
(js)

toDataURL

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

toJPEG

open fun toJPEG(quality: Number): Buffer
(js)

toPNG

open fun toPNG(options: ToPNGOptions? = definedExternally): Buffer

Companion Object Functions

(js)

createEmpty

fun createEmpty(): NativeImage
(js)

createFromBuffer

fun createFromBuffer(buffer: Buffer, options: CreateFromBufferOptions? = definedExternally): NativeImage
(js)

createFromDataURL

fun createFromDataURL(dataURL: String): NativeImage
(js)

createFromNamedImage

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

createFromPath

fun createFromPath(path: String): NativeImage