System.Drawing.Imaging.ImageAttributes.ClearColorKey C# (CSharp) Method

ClearColorKey() public method

public ClearColorKey ( ) : void
return void
		public void ClearColorKey()
		{
			ClearColorKey(ColorAdjustType.Default);
		}

Same methods

ImageAttributes::ClearColorKey ( ColorAdjustType type ) : void

Usage Example

 /// <summary>
 /// Creates the disabled image for the specified Image
 /// </summary>
 /// <param name="normalImage"></param>
 /// <returns></returns>
 public static Image CreateDisabledImage(Image normalImage)
 {
     var imageAttr = new ImageAttributes();
     imageAttr.ClearColorKey();
     imageAttr.SetColorMatrix(DisabledImageColorMatrix);
     var size = normalImage.Size;
     var image = new Bitmap(size.Width, size.Height);
     var graphics = Graphics.FromImage(image);
     graphics.DrawImage(normalImage, new Rectangle(0, 0, size.Width, size.Height), 0, 0, size.Width, size.Height, GraphicsUnit.Pixel, imageAttr);
     graphics.Dispose();
     return image;
 }
All Usage Examples Of System.Drawing.Imaging.ImageAttributes::ClearColorKey