fromArray

fun fromArray(bytes: ByteArray, offset: Int = 0, length: Int = bytes.size, formatHint: ImageFileFormat?, session: Session? = Session.active): ColorBuffer

create a ColorBuffer from a ByteArray containing a formatted image (meaning any of the formats in ImageFileFormat)

Parameters

bytes

a ByteArray containing a formatted image

offset

offset used for reading from bytes, default is 0

length

number of bytes to be used from bytes, default is bytes.size

formatHint

an optional ImageFileFormat hint, default is null