Gorgon
Show / Hide Table of Contents

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 Source

ArrayCount

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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

| Edit this page View Source

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.

| Edit this page View Source

ImageType

Property to return the type of image data.

Declaration
ImageType ImageType { get; }
Property Value
Type Description
ImageType
| Edit this page View Source

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
| Edit this page View Source

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.

| Edit this page View Source

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.

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author