ISimpleHttpImage

Description

interface Tinman.Core.IO.ISimpleHttpImage

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

Public / Methods

Decode​Image


[ThreadSafe]
public method DecodeImage → (9)

bytes in : ByteBuffer

[not-null]
The encoded image data.

contentUrl in : string

[not-empty]
The content URL.

contentType in : string

[not-null]
The content type (MIME).

width in : int32

[>=0]
The width of the image, in pixels.

height in : int32

[>=0]
The height of the image, in pixels.

pixels in : int64 [ ]

[not-null]
Output array for image image pixels (see Colors).

offset in : int32

[>=0]
Offset into pixels in to top-left output pixel.

stride in : int32

[>=0]
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.

IOException

If an I/O error has occurred.

ValidatingException

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