Recurity.Swf.TagHandler.DefineBitsJPEG2.VerifyPNG C# (CSharp) Method

VerifyPNG() private method

Verifies this object and its component for documentation compliance.
private VerifyPNG ( ) : bool
return bool
        private bool VerifyPNG()
        {
            if (this._imageData.Length > 8)
            {
                return false;
            }

            byte[] PNGMagic = { 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A };
            byte[] comparer = { this._imageData[ 0 ], this._imageData[ 1 ], this._imageData[ 2 ],
                                this._imageData[ 3 ], this._imageData[ 4 ], this._imageData[ 5 ],
                                this._imageData[ 6 ], this._imageData[ 7 ] };

            if ( PNGMagic.Equals( comparer ) )
            {
                return true;
            }
            else
            {
                return false;
            }
        }