Type Default Value Read Only Static Description
PixelFormat None No No Gets or sets the pixel format for the document. This property allows you to determine how pixels are represented in terms of bit depth and color space.
Notes

None.

Example

[C#]using (Bitmap bm = (Bitmap)Bitmap.FromFile(Server.MapPath("rez/transparent.png"))) {
  bm.PixelFormat = new PixelFormat(bm.PixelFormat, ColorChannel.Alpha, false);
  Effects.AdjustColors<object>(bm, null, (color, context) => {
    color.R = color.A;
    color.G = color.A;
    color.B = color.A;
    color.A = 0xFF;
    return color;
  });
  bm.Save(Server.MapPath("IG8_Effect_PixelFormat.jpg"));
}


The above reads a PNG with transparency and extracts the alpha channel as a gray intensity map. The input and output files are shown below.


transparent.png


IG8_Effect_PixelFormat.jpg