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
Afficher le fichier Open project: WolfgangSt/axiom Class Usage Examples

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
DDSCodec ( ) : System

Creates a new instance of DDSCodec

Private Methods

Méthode 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 méthode

Creates a new instance of DDSCodec
protected DDSCodec ( ) : System
Résultat System

Decode() public méthode

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).
Résultat object

Encode() public méthode

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).
Résultat void

EncodeToFile() public méthode

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.
Résultat void

MagicNumberToFileExt() public méthode

public MagicNumberToFileExt ( char magicNumber, UInt32 maxbytes ) : String
magicNumber char
maxbytes System.UInt32
Résultat String

Shutdown() public static méthode

public static Shutdown ( ) : void
Résultat void

Startup() public static méthode

public static Startup ( ) : void
Résultat void