private bool AnalyzeGifSignature(List <byte> gifData) { for (int i = 0; i < 6; i++) { GifSignature.Add(gifData[i]); } gifData.RemoveRange(0, 6); List <char> chars = GifSignature.ConvertAll(ByteToChar); string s = new string(chars.ToArray()); if (s == GIFVersion.GIF89a.ToString()) { Version = GIFVersion.GIF89a; } else if (s == GIFVersion.GIF87a.ToString()) { Version = GIFVersion.GIF87a; } else { return(false); } return(true); }
private bool AnalyzeGifSignature(List <byte> gifData) { for (var i = 0; i < 6; i++) { m_GifSignature.Add(gifData[i]); } gifData.RemoveRange(0, 6); var chars = m_GifSignature.ConvertAll(new Converter <byte, char>(ByteToChar)); var s = new string(chars.ToArray()); if (s == GIFVersion.GIF89a.ToString()) { m_Version = GIFVersion.GIF89a; } else if (s == GIFVersion.GIF87a.ToString()) { m_Version = GIFVersion.GIF87a; } else { return(false); } return(true); }
private bool AnalyzeGifSignature(List<byte> gifData) { for (int i = 0; i < 6; i++) { GifSignature.Add(gifData[i]); } gifData.RemoveRange(0, 6); List<char> chars = GifSignature.ConvertAll(ByteToChar); string s = new string(chars.ToArray()); if (s == GIFVersion.GIF89a.ToString()) { Version = GIFVersion.GIF89a; } else if (s == GIFVersion.GIF87a.ToString()) { Version = GIFVersion.GIF87a; } else { return false; } return true; }
private bool AnalyzeGifSignature(List<byte> gifData) { for (int i = 0; i < 6; i++) m_GifSignature.Add(gifData[i]); gifData.RemoveRange(0, 6); List<char> chars = m_GifSignature.ConvertAll<char>(new Converter<byte, char>(ByteToChar)); string s = new string(chars.ToArray()); if (s == GIFVersion.GIF89a.ToString()) m_Version = GIFVersion.GIF89a; else if (s == GIFVersion.GIF87a.ToString()) m_Version = GIFVersion.GIF87a; else return false; return true; }