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

Parse() public method

public Parse ( Stream input, System.UInt64 imageDataSize, byte bitmapFormat ) : void
input Stream
imageDataSize System.UInt64
bitmapFormat byte
return void
        public virtual void Parse(Stream input, UInt64 imageDataSize, byte bitmapFormat)
        {
            if (bitmapFormat.Equals(0x04))
            {
                Pix15 temp = null;

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

            }
            else if (bitmapFormat.Equals(0x05))
            {
                for (UInt64 i = 0; i < imageDataSize; i++)
                {
                    Pix24 temp = new Pix24(this._SwfVersion);
                    temp.Parse(input);
                    this._bitmapPixelData.Add(temp);
                }
            }
            else
            {
                SwfFormatException e = new SwfFormatException("BITMAPDATA can not contain any other bitmap formats than 15-bit RGB images or 24-bit RGB images ");
               Log.Error(this, e.Message);
                throw e;
            }
        }