Example #1
0
 public void MakeTransparent(Color transparentColor)
 {
     // Make all the frames transparent.
     for (int f = 0; f < dgImage.NumFrames; f++)
     {
         Frame frame = dgImage.GetFrame(f);
         int   color = transparentColor.ToArgb();
         if (!Image.IsAlphaPixelFormat(PixelFormat))
         {
             // Remove the alpha component.
             color = color & 0x00FFFFFF;
         }
         frame.MakeTransparent(color);
     }
 }