QoiImageFormat

eu.joaocosta.minart.graphics.image.qoi.QoiImageFormat
See theQoiImageFormat companion object
final class QoiImageFormat[R, W](val byteReader: ByteReader[R], val byteWriter: ByteWriter[W]) extends QoiImageReader[R] with QoiImageWriter[W]

Image format for QOI files.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Inherited methods

def fromByteArray(data: Array[Byte]): Either[String, RamSurface]

Loads an image from a byte array.

Loads an image from a byte array.

Attributes

data

Byte array

Returns:

Either a RamSurface with the image data or an error string

Inherited from:
ImageReader
def loadImage(is: InputStream): Either[String, RamSurface]

Loads an image from an InputStream.

Loads an image from an InputStream.

Attributes

is

InputStream with the image data

Returns:

Either a RamSurface with the image data or an error string

Inherited from:
QoiImageReader
def loadImage(resource: Resource): Try[Either[String, RamSurface]]

Loads an image from a Resource.

Loads an image from a Resource.

Attributes

resource

Resource with the image data

Returns:

Either a RamSurface with the image data or an error string, inside a Try capturing the IO exceptions

Inherited from:
ImageReader
def storeImage(surface: Surface, os: OutputStream): Either[String, Unit]

Stores a surface to an OutputStream.

Stores a surface to an OutputStream.

Attributes

os

OutputStream where to store the data

surface

Surface to store

Returns:

Either unit or an error string

Inherited from:
QoiImageWriter
def storeImage(surface: Surface, resource: Resource): Try[Either[String, Unit]]

Stores a surface to a Resource.

Stores a surface to a Resource.

Attributes

resource

Resource where to store the data

surface

Surface to store

Returns:

Either unit or an error string, inside a Try capturing the IO exceptions

Inherited from:
ImageWriter
def toByteArray(surface: Surface): Either[String, Array[Byte]]

Returns the image data as a byte array.

Returns the image data as a byte array.

Attributes

surface

Surface to convert

Returns:

Either an array with the image data or an error string

Inherited from:
ImageWriter

Concrete fields

val byteReader: ByteReader[R]
val byteWriter: ByteWriter[W]