BitmapData

BitmapData

System.Drawing.Imaging (system.drawing.dll) sealed class

This class encapsulates the raw data of a System.Drawing.Bitmap . It is returned by LockBits() , and the Bitmap.UnlockBits() method releases the data.

You can retrieve the Width , Height , PixelFormat , and Stride (the number of bytes per line including padding, as opposed to the number of pixels). The sign of the Stride can also be used to determine whether this is a top-down or bottom-up bitmap.

The pixel data itself can be retrieved through the Scan0 member, which returns an IntPtr to the start of the image. This can be handed off to either managed or (more commonly) unmanaged image processing code.

 public sealed class  BitmapData  {  // Public Constructors  public  BitmapData  ();  // Public Instance Properties  public int  Height  {set; get; }    public PixelFormat  PixelFormat  {set; get; }    public int  Reserved  {set; get; }    public IntPtr  Scan0  {set; get; }    public int  Stride  {set; get; }    public int  Width  {set; get; } } 

Returned By

System.Drawing.Bitmap.LockBits()

Passed To

System.Drawing.Bitmap.UnlockBits()



. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net