Companion

Functions

Link copied to clipboard
fun fromBase64(text: String, reference: String? = null): JevImage

An image from base64 text (standard alphabet). It is decoded now and sent as bytes. Whitespace, such as the line breaks the base64 tool writes, is ignored.

Link copied to clipboard
fun of(bytes: ByteArray, reference: String? = null): JevImage

An image from its file's bytes, which are copied. A null reference generates one.

Link copied to clipboard
fun read(path: Path, reference: String? = null): JevImage

An image read now from the file at path, on any platform with a file system (Node.js included). A file over the API's 16 MiB limit isn't read: the image carries that problem instead.

Link copied to clipboard
fun JevImage.Companion.read(file: File, reference: String? = null): JevImage

An image read now from file, with the same limit.

fun JevImage.Companion.read(path: Path, reference: String? = null): JevImage

An image read now from path. A file over the API's 16 MiB limit isn't read: the image carries that problem instead. These are Kotlin extensions on the companion; from Java, which would have to pass the companion explicitly, write JevImage.of(Files.readAllBytes(path)).