Exemple #1
0
        public void Load(Stream stream)
        {
            if (stream == null)
                return;

            SpriteReader sr = new SpriteReader(stream);
            Sprite sprite = sr.Read();
            this.Header = sprite.Header;
            this.SpriteBitmap = sprite.SpriteBitmap;
        }
Exemple #2
0
        public void Load(string fileName)
        {
            fileName = fileName.Trim();
            if (String.IsNullOrEmpty(fileName))
                return;

            if (!File.Exists(fileName))
                return;

            using (FileStream fs = new FileStream(fileName, FileMode.Open))
            {
                SpriteReader sr = new SpriteReader(fs);
                Sprite sprite = sr.Read();
                this.Header = sprite.Header;
                this.SpriteBitmap = sprite.SpriteBitmap;
            }
        }