Generic image. More...
Public Member Functions | |
abstract void | AllocatePixelData (int w, int h) |
Allocate pixel data for this Image. | |
abstract object | GetPixelData (int layer) |
Pixel data buffer of any defined image layer. | |
object | GetPixelData () |
Get pixel data buffer representing the first image layer. | |
Properties | |
int | Height [get, set] |
Image height property. | |
int | LayerCount [get, set] |
Image layers count. | |
abstract Pixel.Type | PixelFormat [get] |
Image pixel format. | |
abstract IColor | this [int layer, int x, int y] [get, set] |
Pixel data accessor. | |
IColor | this [int x, int y] [get, set] |
Pixel data accessor for first image layer. | |
int | Width [get, set] |
Image width property. |
Generic image.
The Image class abstract an image: an image is a set of rectangle areas of pixels. Each rectangle area is defined as layer. Each layer could have different meanings, depending on the implementation of the Image class.
Tipical RGB images has only one layer, and each pixel define the red, green and blue components defining the pixel color. Neverless, it is possible to define additional layers to define image mipmaps, which are similar to the original layer but with lower resolutions.
Another application of the Image layers is the definition of Luma-Chroma images. The final pixel color is defined by the components of the three layers in the image. The resulting image pixel color is obtained by sampling the pixel for each layer and transform it using color space convertion matrices.
abstract void Derm.Raster.Image.AllocatePixelData | ( | int | w, | |
int | h | |||
) | [pure virtual] |
Allocate pixel data for this Image.
w | A System.Int32 indicating the image width, in pixels. | |
h | A System.Int32 indicating the image height, in pixels. |
This routine could be called to allocate image layers. Once allocated, the image pixels can be accessed using the Image indexer. Actually the behavior of this routine depends on the current Image implementation, but the following behavior shall be expected:
Implemented in Derm.Raster.LayerImage< T >, and Derm.Raster.RasterImage< T >.
abstract object Derm.Raster.Image.GetPixelData | ( | int | layer | ) | [pure virtual] |
Pixel data buffer of any defined image layer.
This property shall returns an object representing the image pixel data. Tipically it will be a array of packed structures representing a pixel element.
Implemented in Derm.Raster.LayerImage< T >, and Derm.Raster.RasterImage< T >.
object Derm.Raster.Image.GetPixelData | ( | ) |
Get pixel data buffer representing the first image layer.
int Derm.Raster.Image.Height [get, set] |
Image height property.
int Derm.Raster.Image.LayerCount [get, set] |
Image layers count.
abstract Pixel.Type Derm.Raster.Image.PixelFormat [get] |
Image pixel format.
This property shall be only an indicative value about the image color resolution, to allow the best memory management due color precision. Actually this property shall not be used to determine image layering (i.e. YUV formats imply three layers).
Reimplemented in Derm.Raster.LayerImage< T >, and Derm.Raster.RasterImage< T >.
abstract IColor Derm.Raster.Image.this[int layer, int x, int y] [get, set] |
Pixel data accessor.
layer | A System.Int32 indicating the layer to fetch pixel data. | |
x | A System.Int32 indicating the horizontal coordinate of the pixel. The left corners has the coordinate 0. | |
y | A System.Int32 indicating the vertical coordinate of the pixel. The bottom corners has the coordinate 0. |
This indexer allow an uniform access to the Image pixel data. Since the data could be stored in many data types (see Pixel.Type enumeration), the only color type able to map every possible value is the ColorRGBAf.
Reimplemented in Derm.Raster.LayerImage< T >, and Derm.Raster.RasterImage< T >.
IColor Derm.Raster.Image.this[int x, int y] [get, set] |
Pixel data accessor for first image layer.
x | A System.Int32 indicating the horizontal coordinate of the pixel. The left corners has the coordinate 0. | |
y | A System.Int32 indicating the vertical coordinate of the pixel. The bottom corners has the coordinate 0. |
Reimplemented in Derm.Raster.LayerImage< T >, and Derm.Raster.RasterImage< T >.
int Derm.Raster.Image.Width [get, set] |
Image width property.