ImagingUtil

Description

static class Tinman.Terrain.Imaging.ImagingUtil

Helper class for working with image files.

Public / Constants

Gamma​From​Srgb


public constant GammaFromSrgb → (-2.2:float64)

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

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

Gamma​To​Srgb


public constant GammaToSrgb → (-0.45455:float64)

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

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

Public / Methods

Bad​Format


[Pure]
public static method BadFormat → (4)

source in : string

Error source tag.

format in : string

[not-empty]
The file format name.

path in : IPathInfo

[not-null]
The path info object.

message opt : string = null

Optional error message.

returns → IOException

The ready-to-throw exception.

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

Bytes​Per​Pixel


[Pure]
public static method BytesPerPixel → (1)

pixelFormat in : PixelFormat

The pixel format.

returns → int32

The number of bytes per pixel.

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

Gamma​Mul


[Pure]
public static method GammaMul → (2)

in : float64

First gamma correction value.

in : float64

Second gamma correction value.

returns → float64

The resulting gamma correction value.

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

Gamma​Rcp


[Pure]
public static method GammaRcp → (1)

in : float64

The gamma correction value.

returns → float64

The resulting gamma correction value.

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

Map​Info​For


[Pure]
public static method MapInfoFor → (1)

info in : IImageInfo

[not-null]
The image info.

returns → MapInfo

The MapInfo value.

Returns a MapInfo value for the given image info.

Pixel​Format​Of


[Pure]
public static method PixelFormatOf → (1)

color in : int64

The color value (see Colors).

returns → PixelFormat

The pixel format.

Returns the pixel format of the given color.

Pixel​Format​Union


[Pure]
public static method PixelFormatUnion → (2)

in : PixelFormat

First pixel format.

in : PixelFormat

Second pixel format.

returns → PixelFormat

The combined pixel format that can represent pixels in both of the given formats, without loss of data.

Combines the union of the given pixel formats.

Samples​Per​Pixel


[Pure]
public static method SamplesPerPixel → (1)

pixelFormat in : PixelFormat

The pixel format.

returns → int32

The number of samples per pixel.

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

Configuration

Config​Interpolation​Mode


public static attribute ConfigInterpolationMode → (get)

value : IConfigurator<InterpolationMode>

[not-null]
The configurator object.

The configurator object for InterpolationMode values.

Config​Pixel​Channel


public static attribute ConfigPixelChannel → (get)

value : IConfigurator<PixelChannel>

[not-null]
The configurator object.

The configurator object for PixelChannel values.

Config​Pixel​Coverage


public static attribute ConfigPixelCoverage → (get)

value : IConfigurator<PixelCoverage>

[not-null]
The configurator object.

The configurator object for PixelCoverage values.

Config​Pixel​Format


public static attribute ConfigPixelFormat → (get)

value : IConfigurator<PixelFormat>

[not-null]
The configurator object.

The configurator object for PixelFormat values.