Image.Info

Description

Name

struct Tinman.Image.Info

Used by

Image.info

Provides information about an image.

Fields / Required

width

Type

number

The image width, in pixels.


height

Type

number

The image height, in pixels.

Fields / Optional

coverage

Type

Coverage.Type

Default

Coverage.Type.PixelIsArea

The pixel coverage of the image.


pixelFormat

Type

PixelFormat[]

Default

[Truecolor, Alpha, SixteenBits]

The pixel format of the image.


nodata

Type

number

Default

nan

The raw pixel value that represents no-data / void pixels.


pixelRange

Type

PixelRange

Default

{PixelRange: {0, 0}, {0, 0}}

The pixel value range of the image.


gamma

Type

number

Default

1

Depending on the value V of this field, the following gamma correction is applied to the image pixels:

  • V > 0
    Given a normalized image pixel value N, the resulting linear pixel value L is computed as L = pow(N, V).

  • V = -2.2
    The normalized image pixel value is fed into the sRGB decompression function (which can be approximated with a power of 2.2) and the resulting value is used as the linear pixel value.

  • V = -0.45455
    The normalized image pixel value is fed into the sRGB compression function (which can be approximated with a power of 0.45455) and the resulting value value is used as the linear pixel value (which is not correct in a mathematical sense, but might be necessary in rare cases).

  • For all other values of V, the normalized and linear pixel values are treated as being equivalent.


layer

Type

Heightmap.Layer

Default

Heightmap.Layer.None

The target heightmap layer.


georef

Type

Tinman.Georef

Default

null

The georeferencing information that is attached to the image file.


fileFormat

Type

string

Default

'Any'

The image file format.


filePath

Type

path

Default

<?>

Path to the image file.

Fields / External

groundSampleDistance

Type

number

Estimated ground sample distance, in metres.


optimalHeightmapSize

Type

Vec2[]

Optimal heightmap cubesize for the image resolution.