MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.basecode.LockBitmap Class Reference

The LockBitmap class provides very efficient SetPixel and GetPixel functionality of a bitmap by using LockBits to directly access the bitmap data. More...

Public Member Functions

 LockBitmap (Bitmap source)
 Sets the source bitmap. More...
 
void LockBits ()
 Lock bitmap data to access its underlying raw data. More...
 
void UnlockBits ()
 Unlock bitmap data, releasing its underlying data. More...
 
Color GetPixel (int x, int y)
 Get the color of the specified pixel More...
 
void SetPixel (int x, int y, Color color)
 Set the color of the specified pixel More...
 

Properties

byte[] Pixels [getset]
 Get/set the raw pixel byte data. More...
 
int Depth [get]
 Returns the depth of the bitmap. More...
 
int Width [get]
 Returns the width of the bitmap. More...
 
int Height [get]
 Returns the height of the bitmap. More...
 

Detailed Description

The LockBitmap class provides very efficient SetPixel and GetPixel functionality of a bitmap by using LockBits to directly access the bitmap data.

See also
Work with Bitmaps Faster in C# by Vano Maisuradze, Code Project, 2011 Used and distributed under the Code Project Open License (CPOL) 1.02

Definition at line 20 of file LockBitmap.cs.

Constructor & Destructor Documentation

◆ LockBitmap()

MyCaffe.basecode.LockBitmap.LockBitmap ( Bitmap  source)

Sets the source bitmap.

Parameters
sourceSpecifies the source bitmap to use.

Definition at line 47 of file LockBitmap.cs.

Member Function Documentation

◆ GetPixel()

Color MyCaffe.basecode.LockBitmap.GetPixel ( int  x,
int  y 
)

Get the color of the specified pixel

Parameters
xSpecifies the pixel x location.
ySpecifies the pixel y location.
Returns
The color of the pixel is returned.

Definition at line 121 of file LockBitmap.cs.

◆ LockBits()

void MyCaffe.basecode.LockBitmap.LockBits ( )

Lock bitmap data to access its underlying raw data.

Definition at line 55 of file LockBitmap.cs.

◆ SetPixel()

void MyCaffe.basecode.LockBitmap.SetPixel ( int  x,
int  y,
Color  color 
)

Set the color of the specified pixel

Parameters
xSpecifies the pixel x location.
ySpecifies the pixel y location.
colorSpecifies the color to set the pixel.

Definition at line 164 of file LockBitmap.cs.

◆ UnlockBits()

void MyCaffe.basecode.LockBitmap.UnlockBits ( )

Unlock bitmap data, releasing its underlying data.

Definition at line 99 of file LockBitmap.cs.

Property Documentation

◆ Depth

int MyCaffe.basecode.LockBitmap.Depth
get

Returns the depth of the bitmap.

Definition at line 33 of file LockBitmap.cs.

◆ Height

int MyCaffe.basecode.LockBitmap.Height
get

Returns the height of the bitmap.

Definition at line 41 of file LockBitmap.cs.

◆ Pixels

byte [] MyCaffe.basecode.LockBitmap.Pixels
getset

Get/set the raw pixel byte data.

Definition at line 29 of file LockBitmap.cs.

◆ Width

int MyCaffe.basecode.LockBitmap.Width
get

Returns the width of the bitmap.

Definition at line 37 of file LockBitmap.cs.


The documentation for this class was generated from the following file: