Recurity.Swf.Argb.Parse C# (CSharp) Method

Parse() public method

Parses this object out of a stream
public Parse ( Stream input ) : void
input Stream The input stream.
return void
        public override void Parse( Stream input )
        {
            BinaryReader br = new BinaryReader( input );
            this._Alpha = br.ReadByte();
            this._Red = br.ReadByte();
            this._Green = br.ReadByte();
            this._Blue = br.ReadByte();
            //String s = string.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", _Alpha, _Red, _Green, _Blue);
            //Log.Debug(this, "[Begin Structure] ARGB : color=" + s);
            //Log.Debug(this, "[End Structure] ARGB");
        }

Usage Example

Exemplo n.º 1
0
        /// <summary>
        /// Parses this object out of a stream
        /// </summary>
        /// <param name="input">The input stream.</param>
        /// <param name="imageDataSize">The size of the image Data</param>
        public void Parse( Stream input, Int32 imageDataSize )
        {
            Argb temp = null;

            this._bitmapPixelData = new List<Rgb>();

            for ( int i = 0; i < imageDataSize; i++ )
            {
                temp = new Argb(this._SwfVersion);
                temp.Parse( input );
                this._bitmapPixelData.Add( temp );
            }
        }