System.Drawing.Bitmap.MakeTransparent C# (CSharp) Method

MakeTransparent() public method

public MakeTransparent ( ) : void
return void
        public void MakeTransparent()
        {
            // Todo: Instead of passing white here we need to read
            // the Lower-Left pixel of image.  Found this by
            // placing a color in each corner until MakeTransparent
            // did not work.
            //      bitmap.SetPixel(0, bitmap.Height - 1, Color.Magenta);ß

            MakeTransparent (GetPixel(0, Height-1));
        }

Same methods

Bitmap::MakeTransparent ( Color transparentColor ) : void

Usage Example

 /// <summary>
 /// Constructor of a true false column that creates a column
 /// using, be default, a check mark for true and no image for false values.
 /// </summary>
 /// <param name="field">The field within a dataview to use for the column.</param>
 /// <param name="maxWidth">The maximum width for this column</param>
 public ReportBoolColumn(string field, float maxWidth)
     : base(field, maxWidth)
 {
     Bitmap trueBmp = new Bitmap (GetType(), DefaultTrueImageName);
     trueBmp.MakeTransparent ();
     TrueImage = trueBmp;
 }
All Usage Examples Of System.Drawing.Bitmap::MakeTransparent