C# Class Shellscape.Utilities.ImageUtility

Provides utility methods for colourising bitmaps and working with Windows DIB Section objects. Uses unsafe native code to perform the colourisation until (if) another way can be determined.
Datei anzeigen Open project: shellscape/Shellscape.Common

Public Methods

Method Description
DibToBitmap ( IntPtr hDib ) : Bitmap

Converts a Windows DIBSection object to a Bitmap.

Private Methods

Method Description
BitBlt ( IntPtr hDestDC, int x, int y, int nWidth, int nHeight, IntPtr hSrcDC, int xSrc, int ySrc, int dwRop ) : int
CopyMemory ( IntPtr lpvDest, IntPtr lpvSrc, int cbCopy ) : int
CreateCompatibleDC ( IntPtr hDC ) : IntPtr
DeleteDC ( IntPtr hdc ) : int
DeleteObject ( IntPtr hObject ) : int
GetDC ( IntPtr hWnd ) : IntPtr
GetDesktopWindow ( ) : IntPtr
GetObjectBitmap ( IntPtr hObject, int nCount, BITMAP &lpObject ) : int
GetObjectDIBSection ( IntPtr hObject, int nCount, DIBSECTION &lpObject ) : int
ImageUtility ( ) : System

Prevent instances of this class from being created

ReleaseDC ( IntPtr hWnd, IntPtr hDC ) : int
SelectObject ( IntPtr hDC, IntPtr hObject ) : IntPtr

Method Details

DibToBitmap() public static method

Converts a Windows DIBSection object to a Bitmap.
public static DibToBitmap ( IntPtr hDib ) : Bitmap
hDib System.IntPtr Handle to a Windows DIBSection.
return System.Drawing.Bitmap