interface Tinman.Core.IO.ISimpleHttpImage

Base interface for classes that decode image data that has been downloaded by a SimpleHttp object.

Public / Methods


public method DecodeImage → (9)

bytes in : ByteBuffer

The encoded image data.

contentUrl in : string

The content URL.

contentType in : string

The content type (MIME).

width in : int32

The width of the image, in pixels.

height in : int32

The height of the image, in pixels.

pixels in : int64 [ ]

Output array for image image pixels (see Colors).

offset in : int32

Offset into pixels in to top-left output pixel.

stride in : int32

Distance between adjacent pixels rows in pixels in.

defaultSrgb opt : bool = true

If the given image data does not specify a color-space, assume that it is using the sRGB color-space and perform gamma correction accordingly.

returns → int32

0 if the image data has been decoded,
-1 if contentType in is not supported,
-2 if width in or height in do not match.

Decodes the given image data.


If an I/O error has occurred.


If a validation error has occurred on data or the returned image reader.