Interface IGorgonImageInfo
Provides information about an image.
Namespace: Gorgon.Graphics.Imaging
Assembly: Gorgon.Graphics.Imaging.dll
Syntax
public interface IGorgonImageInfo
Properties
| Edit this page View SourceArrayCount
Property to return the total number of images there are in an image array.
Declaration
int ArrayCount { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
This only applies to 1D and 2D images. This parameter will be set to a value of 1 for a 3D image.
If the ImageType is ImageCube, then this value should be set to a multiple of 6. If it is not, then Gorgon will adjust this value to be a multiple of 6 if this image is to be used as a cube map.
This value will be reset to 1 if the value supplied is less than 1.
Depth
Property to return the depth of an image, in pixels.
Declaration
int Depth { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
This applies to 3D images only. This parameter will be set to a value of 1 for a 1D or 2D image.
For applicable image types, a value of less than 1 will throw an exception upon creation.
Format
Property to return the pixel format for an image.
Declaration
BufferFormat Format { get; }
Property Value
Type | Description |
---|---|
BufferFormat |
Remarks
If the value is set to Unknown, then an exception will be thrown upon image creation.
HasPreMultipliedAlpha
Property to return whether the image data is using premultiplied alpha.
Declaration
bool HasPreMultipliedAlpha { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Premultiplied alpha is used to display correct alpha blending. This flag indicates that the data in the image has already been transformed to use premultiplied alpha.
For more information see: Shawn Hargreaves Blog
Height
Property to return the height of an image, in pixels.
Declaration
int Height { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
This applies to 2D and 3D images only. This parameter will be set to a value of 1 for a 1D image.
For applicable image types, a value of less than 1 will throw an exception upon creation.
ImageType
Property to return the type of image data.
Declaration
ImageType ImageType { get; }
Property Value
Type | Description |
---|---|
ImageType |
IsPowerOfTwo
Property to return whether the size of the texture is a power of 2 or not.
Declaration
bool IsPowerOfTwo { get; }
Property Value
Type | Description |
---|---|
bool |
MipCount
Property to return the number of mip map levels in the image.
Declaration
int MipCount { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
If this value is set to 0, or less, then a full mip-map chain will be generated for the image.
Width
Property to return the width of an image, in pixels.
Declaration
int Width { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
A value of less than 1 will throw an exception upon creation.