C# Class Axiom.Media.DDSCodec

Codec specialized in loading DDS (Direct Draw Surface) images.
We implement our own codec here since we need to be able to keep DXT data compressed if the card supports it.
Inheritance: ImageCodec
Datei anzeigen Open project: WolfgangSt/axiom Class Usage Examples

Public Methods

Method Description
Decode ( Stream input, Stream output ) : object

Codes the data from the input chunk into the output chunk.

Encode ( Stream input, Stream output ) : void

Encodes the data in the input stream and saves the result in the output stream.

EncodeToFile ( Stream input, string filename, object codecData ) : void

Encodes data to a file.

MagicNumberToFileExt ( char magicNumber, UInt32 maxbytes ) : String
Shutdown ( ) : void
Startup ( ) : void

Protected Methods

Method Description
DDSCodec ( ) : System

Creates a new instance of DDSCodec

Private Methods

Method Description
ConvertFourCCFormat ( UInt32 fourcc ) : PixelFormat
ConvertPixelFormat ( UInt32 rgbBits, UInt32 rMask, UInt32 gMask, UInt32 bMask, UInt32 aMask ) : PixelFormat
FlipEndian ( IntPtr pData, UInt32 size ) : void
FlipEndian ( IntPtr pData, UInt32 size, UInt32 count ) : void
UnpackDXTAlpha ( DXTExplicitAlphaBlock block, ColorEx pCol ) : void
UnpackDXTAlpha ( DXTInterpolatedAlphaBlock block, ColorEx pCol ) : void
UnpackDXTColour ( PixelFormat pf, DXTColorBlock block, ColorEx pCol ) : void

Method Details

DDSCodec() protected method

Creates a new instance of DDSCodec
protected DDSCodec ( ) : System
return System

Decode() public method

Codes the data from the input chunk into the output chunk.
public Decode ( Stream input, Stream output ) : object
input Stream Input stream (encoded data).
output Stream Output stream (decoded data).
return object

Encode() public method

Encodes the data in the input stream and saves the result in the output stream.
public Encode ( Stream input, Stream output ) : void
input Stream Input stream (decoded data).
output Stream Output stream (encoded data).
return void

EncodeToFile() public method

Encodes data to a file.
public EncodeToFile ( Stream input, string filename, object codecData ) : void
input Stream Stream containing data to write.
filename string
codecData object Extra data to use in order to describe the codec data.
return void

MagicNumberToFileExt() public method

public MagicNumberToFileExt ( char magicNumber, UInt32 maxbytes ) : String
magicNumber char
maxbytes System.UInt32
return String

Shutdown() public static method

public static Shutdown ( ) : void
return void

Startup() public static method

public static Startup ( ) : void
return void