public void Read(System.IO.Stream os) { //saveseedpool.Clear(); //poolindex.Clear(); #if USECompression using(GZipStream s=new GZipStream(os,CompressionMode.Decompress)) #else var s = os; #endif { //int pcount = s.ReadByte(); //for (int i = 0; i < pcount; i++) //{ // Seed _s = new Seed(); // _s.Read(s); // string name=System.IO.Path.GetFileNameWithoutExtension(_s.texname); // poolindex.Add(name); // saveseedpool[name]=_s; //} this.fps=s.ReadByte(); byte[] bb = new byte[255]; s.Read(bb, 0, 2); this.size.X = BitConverter.ToInt16(bb, 0); s.Read(bb, 0, 2); this.size.Y = BitConverter.ToInt16(bb, 0); frames.Clear(); s.Read(bb, 0, 2); int fcount = BitConverter.ToInt16(bb, 0); for (int i = 0; i < fcount; i++) { Frame f = new Frame(); f.Read(s); frames.Add(f); } } //saveseedpool.Clear(); //poolindex.Clear(); }
public Frame Copy() { Frame f = new Frame(); foreach (var e in elems) { f.elems.Add(e.Copy()); } foreach (var t in frametags) { f.frametags.Add(t); } return f; }