IImageInfo
Description
- Derived from
- Extended by
-
IImageReader
ImageInfo sealed
Provides information about an image.
When consuming image data, pixel data is processed in the following order:
-
Stored pixel values
An IImageReader implementation reads stored pixel values from the encoded image data (for example, signed 16-bit integer values). The special NoData value is used for undefined / void pixels. Optionally, a transformation is applied to all non-void stored pixel values (see Stored), converting them to raw pixel values. This is often used to encode fixed-point real numbers (for example, using three decimal digits to encode metres as integral millimetres). -
Raw pixel values
The Range property defined a transformation from raw pixel values to normalized pixel values, where the Values property indicates the range of raw pixel values that are present in the image data. The vertical unit of the image geo-reference (see CoordinateSystem.VerticalUnit) refers to raw pixel values. -
Normalized pixel values
After reading image data, the final RGBA values are stored in a Scanline object. These values are in the normalized range [0..1], being premultiplied with 16777215, which corresponds to a bit-depth of 24. Lossless conversions to other bit-depths exist (see Conversions).
Public / Attributes
Coverage
The pixel coverage of the image.
Usually, images have a pixel coverage of PixelCoverage.PixelIsArea.
Gamma
The gamma correction that must be applied to normalized image pixels in order to obtain linear pixel values.
Depending on the value V of this property, the following gamma correction is applied:
-
V > 0
Given a normalized image pixel valueN, the resulting linear pixel valueLis computed asL = pow(N, V). -
V = -2.2(see ImagingUtil.GammaFromSrgb)
The normalized image pixel value is fed into the ColorF.FromSrgbF method and its return value is used as the linear pixel value. -
V = -0.45455(see ImagingUtil.GammaToSrgb)
The normalized image pixel value is fed into the ColorF.ToSrgbF method and its return 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.
- See also
Height
Height of the image, in pixels.
This is the number of image pixels along the Y-axis, which may be different from the raster height (see MapInfo), depending on the pixel coverage.
ImageFormat
The file format of the image file.
The default file format is ImageFormat.Any, which will try to load image data using any of the available image formats.
Layer
The heightmap layer which shall receive the data of this image.
This is not an actual property of the image, but included here for convenience when images are imported into heightmap datasets.
NoData
The stored pixel value that represents missing data (i.e. void pixels).
The default value is Maths.NanD (i.e. all stored pixel values are valid).
- See also
PixelFormat
The pixel format of the image.
Image processing is always performed with four 24-bit integer channels (see Scanline). The pixel format provides additional information about the stored pixel data.
Stored
The linear transformation from stored pixel values to raw pixel values:
raw = (stored * Stored.X + Stored.Y) * Stored.Z + stored * (1 - Stored.Z)
The metadata of an image may contain coefficients for the linear transformation. When reading the image data, it is not always desirable to apply the transformation. In such a case, the transformation is exposed with Vec3D.X and Vec3D.Y, but effectively disabled by Vec3D.Z being zero (this is also used to provide backward compatible behaviour). With IImageOps.SetStored, the transformation can be enabled, using either the coefficients read from metadata or custom coefficients specified at call time.
Values
The range of raw pixel values that are actually present in the image data, excluding the no-data value.
The header information of an image may include the range of raw pixel values. In such a case, that range will always be returned here, even if ReadImageFlags.Range has not been specified. Otherwise, RangeD.Inv will be returned, to indicate that the raw pixel value range is not available up-front. Specifying ReadImageFlags.Range in the latter case will trigger an additional pass over the image data, in order to determine the value range.
- See also
Width
Width of the image, in pixels.
This is the number of image pixels along the X-axis, which may be different from the raster width (see MapInfo), depending on the pixel coverage.