TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class ImagingUtil in Tinman.Terrain.Imaging

Utility class for working with image files.

static class ImagingUtil  

Configuration

ConfigInterpolationMode

The configurator object for InterpolationMode values.

public static property ConfigInterpolationMode { get }
type IConfigurator<InterpolationMode>
value [not-null] The configurator object.

ConfigPixelChannel

The configurator object for PixelChannel values.

public static property ConfigPixelChannel { get }
type IConfigurator<PixelChannel>
value [not-null] The configurator object.

ConfigPixelCoverage

The configurator object for PixelCoverage values.

public static property ConfigPixelCoverage { get }
type IConfigurator<PixelCoverage>
value [not-null] The configurator object.

ConfigPixelFormat

The configurator object for PixelFormat values.

public static property ConfigPixelFormat { get }
type IConfigurator<PixelFormat>
value [not-null] The configurator object.

Public / Constants

GammaFromSrgb

Special gamma correction value for the sRGB color space (see Gamma).

public constant GammaFromSrgb = -2.2
type float64

Remarks:

Color space decompression for sRGB can be approximated with the exponent 2.2. The full formula is implemented in FromSrgbF.

GammaToSrgb

Special gamma correction value for the sRGB color space (see Gamma).

public constant GammaToSrgb = -0.45455
type float64

Remarks:

This is the same value that is found in the gAMA chunk of sRGB compressed PNG files.

Public / Methods

BadFormat

The binary format of an image file format is invalid and cannot be read.

[Pure]
public static method BadFormat (string source, string format, IPathInfo path, string message = null)
type IOException
params source Error source tag.
  format [not-empty] The file format name.
  path [not-null] The path info object.
  message Optional error message. Defaults to null.
returns The ready-to-throw exception.

BytesPerPixel

Returns the number of bytes per pixel for the given pixel format.

[Pure]
public static method BytesPerPixel (PixelFormat pixelFormat)
type int32
params pixelFormat The pixel format.
returns [>0] The number of bytes per pixel.

GammaMul

Multiplies the given gamma correction values (see Gamma), as would be done with pure exponents.

[Pure]
public static method GammaMul (float64 a, float64 b)
type float64
params a First gamma correction value.
  b Second gamma correction value.
returns The resulting gamma correction value.

GammaRcp

Returns the reciprocal of the given gamma correction value (see Gamma), as would be done with a pure exponent.

[Pure]
public static method GammaRcp (float64 a)
type float64
params a The gamma correction value.
returns The resulting gamma correction value.

MapInfoFor

Returns a MapInfo value for the given image info.

[Pure]
public static method MapInfoFor (IImageInfo info)
type MapInfo
params info [not-null] The image info.
returns The MapInfo value.

PixelFormatOf

Returns the pixel format of the given color.

[Pure]
public static method PixelFormatOf (int64 color)
type PixelFormat
params color The color value (see Colors).
returns The pixel format.

PixelFormatUnion

Combines the union of the given pixel formats.

[Pure]
public static method PixelFormatUnion (PixelFormat a, PixelFormat b)
type PixelFormat
params a First pixel format.
  b Second pixel format.
returns The combined pixel format that can represent pixels in both of the given formats, without loss of data.

SamplesPerPixel

Returns the number of samples per pixel for the given pixel format.

[Pure]
public static method SamplesPerPixel (PixelFormat pixelFormat)
type int32
params pixelFormat The pixel format.
returns [>0] The number of samples per pixel.