Ejemplo n.º 1
0
 public Animation(MNG mng)
 {
     frame = 0;
     listBitmap = new List<Bitmap>();
     listOffset = new List<Point>();
     Point frameSize = new Point(mng.Width, mng.Height);
     for (int i = 0; i < mng.NumEmbeddedPNG; i++)
     {
         Bitmap bmp = mng.ToBitmap(i);
         Point p = mng.GetOffset(i);
         AddBitmap(bmp, p);
     }
 }
Ejemplo n.º 2
0
 private void doLoadMNG()
 {
     dlgOpen.Filter = "MNG|*.MNG";
     dlgSave.DefaultExt = ".MNG";
     dlgOpen.Multiselect = false;
     if (dlgOpen.ShowDialog() == DialogResult.OK)
     {
         MNG mng = new MNG();
         if(!mng.Load(dlgOpen.FileName))
             MessageBox.Show("Can not load \n"+dlgOpen.FileName,Application.ProductName);
         int c = lstPictureList.Items.Count;
         for (int i = 0; i < mng.NumEmbeddedPNG; i++)
         {
             Bitmap bmp = mng.ToBitmap(i);
             Point p = mng.GetOffset(i);
             Animation.AddBitmap(bmp, p);
             lstPictureList.Items.Add("[" + c.ToString() + "] " + bmp.Width.ToString() + " " + bmp.Height.ToString());
             c++;
         }
     }
 }