createFromBuffer

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

Creates a new NativeImage instance from buffer. Tries to decode as PNG or JPEG first.