C# Class CSharpImageLibrary.Headers.DDS_Header

Contains header information about a DDS File.
Inheritance: AbstractHeader
Datei anzeigen Open project: KFreon/CSharpImageLibrary Class Usage Examples

Public Properties

Property Type Description
dwCaps2 int
dwCaps3 int
dwCaps4 int
dwReserved1 int[]
dwReserved2 int

Public Methods

Method Description
DDS_Header ( Stream stream ) : System

Read Header from DDS Image.

DDS_Header ( int Mips, int Height, int Width, ImageEngineFormat surfaceformat, List customMasks = null ) : System

Creates a DDS header from a set of information.

DetermineDDSSurfaceFormat ( DDS_Header ddspf ) : ImageEngineFormat

Determines DDS Surface Format given the header.

WriteToArray ( byte destination, int index ) : void

Writes header to destination array starting at index.

Protected Methods

Method Description
Load ( Stream stream ) : long

Reads DDS header from stream.

Private Methods

Method Description
CheckIdentifier ( byte IDBlock ) : bool
DDS_FlagStringify ( Type enumType ) : string
ParseFormatToFourCC ( ImageEngineFormat format ) : FourCC
ParseFourCC ( FourCC fourCC, DXGI_FORMAT additionalDX10 = DXGI_FORMAT.DXGI_FORMAT_UNKNOWN ) : ImageEngineFormat

Determines friendly format from FourCC, with additional DXGI/DX10 format.

Method Details

DDS_Header() public method

Read Header from DDS Image.
public DDS_Header ( Stream stream ) : System
stream Stream Fully formatted DDS image.
return System

DDS_Header() public method

Creates a DDS header from a set of information.
public DDS_Header ( int Mips, int Height, int Width, ImageEngineFormat surfaceformat, List customMasks = null ) : System
Mips int Number of mipmaps.
Height int Height of top mipmap.
Width int Width of top mipmap.
surfaceformat ImageEngineFormat Format header represents.
customMasks List Custom user defined masks for colours.
return System

DetermineDDSSurfaceFormat() public static method

Determines DDS Surface Format given the header.
public static DetermineDDSSurfaceFormat ( DDS_Header ddspf ) : ImageEngineFormat
ddspf DDS_Header DDS PixelFormat structure.
return ImageEngineFormat

Load() protected method

Reads DDS header from stream.
protected Load ( Stream stream ) : long
stream Stream Fully formatted DDS image.
return long

WriteToArray() public method

Writes header to destination array starting at index.
public WriteToArray ( byte destination, int index ) : void
destination byte Array to write header to.
index int Index in destination to start writing at.
return void

Property Details

dwCaps2 public_oe property

Don't think it's used.
public int dwCaps2
return int

dwCaps3 public_oe property

Don't think it's used.
public int dwCaps3
return int

dwCaps4 public_oe property

Don't think it's used.
public int dwCaps4
return int

dwReserved1 public_oe property

Not used, as per Windows DDS spec.
public int[] dwReserved1
return int[]

dwReserved2 public_oe property

Not used as per Windows DDS spec.
public int dwReserved2
return int