C# Class TagTool.Common.DdsHeader

Represents the header of a DirectDraw Surface (DDS) file.
Show file Open project: TheGuardians/TagTool Class Usage Examples

Public Methods

Method Description
DdsHeader ( ) : System
Read ( Stream stream ) : DdsHeader

Reads a DDS header from a stream. On return, the stream will be positioned at the beginning of the texture data.

WriteTo ( Stream stream ) : void

Writes the DDS header to a stream. On return, the stream will be positioned where the texture data should go.

Private Methods

Method Description
CalculateFormatFlags ( ) : DdsFormatFlags
CalculateHeaderFlags ( ) : DdsFlags
CalculateSurfaceComplexityFlags ( ) : DdsSurfaceComplexityFlags
ReadDdsD3D10Header ( BinaryReader reader ) : void
ReadDdsHeader ( BinaryReader reader ) : void
ReadDdsPixelFormat ( BinaryReader reader ) : void
WriteDdsD3D10Header ( BinaryWriter writer ) : void
WriteDdsHeader ( BinaryWriter writer ) : void
WriteDdsPixelFormat ( BinaryWriter writer ) : void

Method Details

DdsHeader() public method

public DdsHeader ( ) : System
return System

Read() public static method

Reads a DDS header from a stream. On return, the stream will be positioned at the beginning of the texture data.
Thrown if the DDS header is invalid.
public static Read ( Stream stream ) : DdsHeader
stream Stream The stream to read from.
return DdsHeader

WriteTo() public method

Writes the DDS header to a stream. On return, the stream will be positioned where the texture data should go.
Thrown if an error occurs while saving.
public WriteTo ( Stream stream ) : void
stream Stream The stream to write to.
return void