Axiom.RenderSystems.Xna.XnaCodec.Decode C# (CSharp) Method

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
        public override object Decode( Stream input, Stream output, params object[] args )
        {
            byte[] data = new byte[ input.Length ];
            input.Read( data, 0, (int)input.Length );
            output.Write( data, 0, (int)input.Length );
            if ( input.GetType() == typeof( XnaImageCodecStream ) )
            {
                return ( (XnaImageCodecStream)input ).ImageData;
            }
            return null;
        }