123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- //------------------------------------------------------------------------------
- // File: DibHelper.H
- //
- // Desc: DirectShow sample code - Helper code for bitmap manipulation
- //
- // Copyright (c) Microsoft Corporation. All rights reserved.
- //------------------------------------------------------------------------------
- #ifndef PLUGIN_DSHOW_DSDIBHELPER_H
- #define PLUGIN_DSHOW_DSDIBHELPER_H
- #define HDIB HANDLE
- /* DIB macros */
- #define IS_WIN30_DIB(lpbi) ((*(LPDWORD)(lpbi)) == sizeof(BITMAPINFOHEADER))
- #define RECTWIDTH(lpRect) ((lpRect)->right - (lpRect)->left)
- #define RECTHEIGHT(lpRect) ((lpRect)->bottom - (lpRect)->top)
- // Function prototypes
- HDIB BitmapToDIB (HBITMAP hBitmap, HPALETTE hPal);
- HDIB ChangeBitmapFormat (HBITMAP hBitmap,
- WORD wBitCount,
- DWORD dwCompression,
- HPALETTE hPal);
- HDIB ChangeDIBFormat (HDIB hDIB, WORD wBitCount, DWORD dwCompression);
- HBITMAP CopyScreenToBitmap(LPRECT lpRect, BYTE *pData, BITMAPINFO *pHeader);
- HDIB CopyScreenToDIB (LPRECT);
- HBITMAP CopyWindowToBitmap (HWND, WORD);
- HDIB CopyWindowToDIB (HWND, WORD);
- HPALETTE CreateDIBPalette (HDIB);
- HDIB CreateDIB(DWORD, DWORD, WORD);
- WORD DestroyDIB (HDIB);
- void DIBError (int ErrNo);
- DWORD DIBHeight (LPSTR lpDIB);
- WORD DIBNumColors (LPSTR lpDIB);
- HBITMAP DIBToBitmap (HDIB hDIB, HPALETTE hPal);
- DWORD DIBWidth (LPSTR lpDIB);
- LPSTR FindDIBBits (LPSTR lpDIB);
- HPALETTE GetSystemPalette (void);
- HDIB LoadDIB (LPSTR);
- BOOL PaintBitmap (HDC, LPRECT, HBITMAP, LPRECT, HPALETTE);
- BOOL PaintDIB (HDC, LPRECT, HDIB, LPRECT, HPALETTE);
- int PalEntriesOnDevice (HDC hDC);
- WORD PaletteSize (LPSTR lpDIB);
- WORD SaveDIB (HDIB, LPSTR);
- #endif /* PLUGIN_DSHOW_DSDIBHELPER_H */
- //------------------------------------------------------------------------------
- // File: DibHelper.H
- //
- // Desc: DirectShow sample code - Helper code for bitmap manipulation
- //
- // Copyright (c) Microsoft Corporation. All rights reserved.
- //------------------------------------------------------------------------------
- #ifndef PLUGIN_DSHOW_DSDIBHELPER_H
- #define PLUGIN_DSHOW_DSDIBHELPER_H
- #define HDIB HANDLE
- /* DIB macros */
- #define IS_WIN30_DIB(lpbi) ((*(LPDWORD)(lpbi)) == sizeof(BITMAPINFOHEADER))
- #define RECTWIDTH(lpRect) ((lpRect)->right - (lpRect)->left)
- #define RECTHEIGHT(lpRect) ((lpRect)->bottom - (lpRect)->top)
- // Function prototypes
- HDIB BitmapToDIB (HBITMAP hBitmap, HPALETTE hPal);
- HDIB ChangeBitmapFormat (HBITMAP hBitmap,
- WORD wBitCount,
- DWORD dwCompression,
- HPALETTE hPal);
- HDIB ChangeDIBFormat (HDIB hDIB, WORD wBitCount, DWORD dwCompression);
- HBITMAP CopyScreenToBitmap(LPRECT lpRect, BYTE *pData, BITMAPINFO *pHeader);
- HDIB CopyScreenToDIB (LPRECT);
- HBITMAP CopyWindowToBitmap (HWND, WORD);
- HDIB CopyWindowToDIB (HWND, WORD);
- HPALETTE CreateDIBPalette (HDIB);
- HDIB CreateDIB(DWORD, DWORD, WORD);
- WORD DestroyDIB (HDIB);
- void DIBError (int ErrNo);
- DWORD DIBHeight (LPSTR lpDIB);
- WORD DIBNumColors (LPSTR lpDIB);
- HBITMAP DIBToBitmap (HDIB hDIB, HPALETTE hPal);
- DWORD DIBWidth (LPSTR lpDIB);
- LPSTR FindDIBBits (LPSTR lpDIB);
- HPALETTE GetSystemPalette (void);
- HDIB LoadDIB (LPSTR);
- BOOL PaintBitmap (HDC, LPRECT, HBITMAP, LPRECT, HPALETTE);
- BOOL PaintDIB (HDC, LPRECT, HDIB, LPRECT, HPALETTE);
- int PalEntriesOnDevice (HDC hDC);
- WORD PaletteSize (LPSTR lpDIB);
- WORD SaveDIB (HDIB, LPSTR);
- #endif /* PLUGIN_DSHOW_DSDIBHELPER_H */
|