diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Plugins/General/gen_ml/graphics.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Plugins/General/gen_ml/graphics.h')
-rw-r--r-- | Src/Plugins/General/gen_ml/graphics.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Src/Plugins/General/gen_ml/graphics.h b/Src/Plugins/General/gen_ml/graphics.h new file mode 100644 index 00000000..a7a00d6f --- /dev/null +++ b/Src/Plugins/General/gen_ml/graphics.h @@ -0,0 +1,26 @@ +#ifndef NULLSOFT_MEIDALIBRARY_GRAPHICS_HEADER +#define NULLSOFT_MEIDALIBRARY_GRAPHICS_HEADER + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +#include <windows.h> + +typedef struct _COLOR24 COLOR24; + +typedef void (*BMPFILTERPROC)(const COLOR24*, const COLOR24*, COLOR24*); + +HBITMAP CreateBitmapMask(HBITMAP originalBmp, COLORREF transColor); // Creates Mask Bitmap using specified color (helper) +HBITMAP CreateBitmapMask(HBITMAP originalBmp, int cx, int cy); // Creates Mask Bitmap using color from specified location (helper) +HBITMAP CreateBitmapMask(HBITMAP originalBmp, COLORREF transColor, int cx, int cy); // Creates Mask Bitmap if transColor is NULL uses color from specified position + +HBITMAP ConvertTo24bpp(HBITMAP bmp, int bpp=24); // creates a new bitmap with 24bpp. You responsible for destroying both + +HBITMAP PatchBitmapColors24(HBITMAP bitmap, COLORREF color1, COLORREF color2, BMPFILTERPROC filterProc); + +void Filter1(const COLOR24 *color1, const COLOR24 *color2, COLOR24 *pixel); // default filter 1 +void Filter2(const COLOR24 *color1, const COLOR24 *color2, COLOR24 *pixel); // default filter 2 + +#endif //NULLSOFT_MEIDALIBRARY_GRAPHICS_HEADER + |