public void Set(string stream) { Debug.Log("APPLICATION EXTENSION: " + stream); string extension = stream.Substring(0, 2); string label = stream.Substring(2, 2); if (label != ExtensionLabel) { Debug.LogError("NOT AN APPLICATION EXTENSION"); } BlockSize = GifHelper.HexToDecimal(stream.Substring(4, 2)); ApplicationIdentifier = GifHelper.HexToASCII(stream.Substring(6, 16)); AuthenticationCode = GifHelper.HexToASCII(stream.Substring(22, 6)); }
public void Set(string stream) { Debug.Log("HEADER: " + stream); //Debug.LogError("HEADER: " + stream); Signature = stream.Substring(0, 6); Version = stream.Substring(6, 6); if (GifHelper.HexToASCII(Signature) != "GIF") { Debug.LogError("NOT A GIF"); } string ASCIIVersion = GifHelper.HexToASCII(Version); if (ASCIIVersion != "89a" && ASCIIVersion != "87a") { Debug.LogError("NOT A COMPATIBLE VERSION " + ASCIIVersion); } }