im.im_dib

\file \brief Windows DIB (Device Independent Bitmap)

See Copyright Notice in im_lib.h

Members

Aliases

imDibLineGetPixel
alias imDibLineGetPixel = uint function(ubyte* line, int col)

DIB GetPixel function definition. \n * the DWORD is a raw copy of the bits, use (ubyte*)&pixel * \ingroup dib

imDibLineSetPixel
alias imDibLineSetPixel = void function(ubyte* line, int col, uint pixel)

DIB SetPixel function definition * \ingroup dib

Functions

imDibCaptureScreen
imDib* imDibCaptureScreen(int x, int y, int width, int height)

Captures the screen into a DIB. * \ingroup dib

imDibCopyClipboard
void imDibCopyClipboard(imDib* dib)

Transfer the DIB to the clipboard. \n * "dib" pointer can not be used after, or use imDibCopyClipboard(imDibCreateCopy(dib)). \n * You cannot paste a DIB section from one application into another application. \n * Warning: Clipboard functions in C++ can fail with Visual C++ /EHsc (Enable C++ Exceptions) * \ingroup dib

imDibCreate
imDib* imDibCreate(int width, int height, int bpp)

Creates a new DIB. \n * use bpp=-16/-32 to allocate space for BITFLIEDS. \n * Allocates all fields. * \ingroup dib

imDibCreateCopy
imDib* imDibCreateCopy(const(imDib)* dib)

Duplicates the DIB contents in a new DIB. \n * A Reference DIB will be copied into a full DIB structure. * \ingroup dib

imDibCreateReference
imDib* imDibCreateReference(BYTE* bmi, BYTE* bits)

Creates a DIB using an already allocated memory. \n * "bmi" must be a pointer to BITMAPINFOHEADER. \n * "bits" can be NULL if it is inside "bmi" after the palette. \n * "handle" is not allocated. buffer will point to bmi. * \ingroup dib

imDibCreateSection
imDib* imDibCreateSection(HDC hDC, HBITMAP* bitmap, int width, int height, int bpp)

Creates a DIB section for drawing purposes. \n * Returns the bitmap that is also created. \n * "handle" is not allocated. \n * You cannot paste a DIB section from one application into another application. * \ingroup dib

imDibDecodeToBitmap
void imDibDecodeToBitmap(const(imDib)* dib, ubyte* data)

Converts a DIB into IM_RGB packed image, with or without alpha. * \ingroup dib

imDibDecodeToMap
void imDibDecodeToMap(const(imDib)* dib, ubyte* map, c_long* palette)

Converts a DIB into an indexed image. bpp must be <=8. colors must have room for at least 256 colors. * colors is rgb packed (RGBRGBRGB...) * \ingroup dib

imDibDecodeToRGBA
void imDibDecodeToRGBA(const(imDib)* dib, ubyte* red, ubyte* green, ubyte* blue, ubyte* alpha)

Converts a DIB into an RGBA image. alpha is optional. bpp must be >8. \n * alpha is used only when bpp=32. * \ingroup dib

imDibDestroy
void imDibDestroy(imDib* dib)

Destroy the DIB * \ingroup dib

imDibEncodeFromBitmap
void imDibEncodeFromBitmap(imDib* dib, const(ubyte)* data)

Converts a IM_RGB packed image, with or without alpha, into a DIB. * \ingroup dib

imDibEncodeFromMap
void imDibEncodeFromMap(imDib* dib, const(ubyte)* map, const(c_long)* palette, int palette_count)

Converts an indexed image into a DIB. bpp must be <=8. \n * colors is rgb packed (RGBRGBRGB...) * \ingroup dib

imDibEncodeFromRGBA
void imDibEncodeFromRGBA(imDib* dib, const(ubyte)* red, const(ubyte)* green, const(ubyte)* blue, const(ubyte)* alpha)

Converts an RGBA image into a DIB. alpha is optional. bpp must be >8. \n * alpha is used only when bpp=32. * \ingroup dib

imDibFromHBitmap
imDib* imDibFromHBitmap(HBITMAP image, HPALETTE hPalette)

Creates a DIB from a image handle and a palette handle. * \ingroup dib

imDibFromImage
imDib* imDibFromImage(const(imImage)* image)

Creates a Dib from the image. It must be a bitmap image. * \ingroup dib

imDibIsClipboardAvailable
int imDibIsClipboardAvailable()

Checks if there is a dib at the clipboard. * \ingroup dib

imDibLineGetPixelFunc
imDibLineGetPixel imDibLineGetPixelFunc(int bpp)

Returns a function to read pixels from a DIB line. * \ingroup dib

imDibLineSetPixelFunc
imDibLineSetPixel imDibLineSetPixelFunc(int bpp)

Returns a function to write pixels into a DIB line. * \ingroup dib

imDibLoadFile
imDib* imDibLoadFile(const(char)* filename)

Creates a DIB from a file ".bmp". * \ingroup dib

imDibLogicalPalette
HPALETTE imDibLogicalPalette(const(imDib)* dib)

Returns a Logical palette from the DIB palette. \n * DIB bpp must be <=8. * \ingroup dib

imDibPasteClipboard
imDib* imDibPasteClipboard()

Creates a reference for the DIB in the clipboard if any. Returns NULL otherwise. * Warning: Clipboard functions in C++ can fail with Visual C++ /EHsc (Enable C++ Exceptions) * \ingroup dib

imDibSaveFile
int imDibSaveFile(const(imDib)* dib, const(char)* filename)

Saves the DIB into a file ".bmp". * \ingroup dib

imDibSectionFromImage
imDib* imDibSectionFromImage(HDC hDC, HBITMAP* bitmap, const(imImage)* image)

Creates a Dib Section from the image. It must be a bitmap image. \ingroup dib

imDibToHBitmap
HBITMAP imDibToHBitmap(const(imDib)* dib)

Creates a image handle from a DIB. * \ingroup dib

imDibToImage
imImage* imDibToImage(const(imDib)* dib)

Creates a imImage from the dib data. * \ingroup dib

imImageLoadFromResource
imImage* imImageLoadFromResource(HMODULE module_, LPCTSTR name, int index, int* error)

Creates an imImage from a RCDATA in the executable/dll resources. (Since 3.9) \n * module can be NULL, it will use GetModuleHandle(NULL). \n * name is the name of the resource. If using IDs, then can be obtained from MAKEINTRESOURCE(id). \n * index is the image index in the file, 0 will return the first image. * \ingroup dib

Structs

imDib
struct imDib

\brief Windows DIB Structure * * \par * Handles a DIB in memory. \n * The DIB is stored in only one buffer. * The secondary members are pointers to the main buffer. * \ingroup dib

Meta