diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-20 18:33:39 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-20 18:33:39 +0000 |
commit | 67c6f233d7e60ad59918e734fe565f5f5dfd28d5 (patch) | |
tree | 213ab09cf6250d2bee311dc20e0c580838681580 /plugins/AVS/image_utils.h | |
parent | c9bf0c30a59a922b96713db54e2293fdf7334adf (diff) |
projects renames and fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@105 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AVS/image_utils.h')
-rw-r--r-- | plugins/AVS/image_utils.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/plugins/AVS/image_utils.h b/plugins/AVS/image_utils.h new file mode 100644 index 0000000000..2dd75d8211 --- /dev/null +++ b/plugins/AVS/image_utils.h @@ -0,0 +1,58 @@ +#ifndef __IMAGE_UTILS_H__
+# define __IMAGE_UTILS_H__
+
+#define _WIN32_WINNT 0x0501
+#include <windows.h>
+
+#include <m_avatars.h>
+
+
+// Load an image
+// wParam = NULL
+// lParam = filename
+INT_PTR BmpFilterLoadBitmap32(WPARAM wParam,LPARAM lParam);
+
+// Save an HBITMAP to an image
+// wParam = HBITMAP
+// lParam = full path of filename
+INT_PTR BmpFilterSaveBitmap(WPARAM wParam,LPARAM lParam);
+#if defined(_UNICODE)
+ INT_PTR BmpFilterSaveBitmapW(WPARAM wParam,LPARAM lParam);
+ #define BmpFilterSaveBitmapT BmpFilterSaveBitmapW
+#else
+ #define BmpFilterSaveBitmapT BmpFilterSaveBitmap
+#endif
+
+// Returns != 0 if can save that type of image, = 0 if cant
+// wParam = 0
+// lParam = PA_FORMAT_* // image format
+INT_PTR BmpFilterCanSaveBitmap(WPARAM wParam,LPARAM lParam);
+
+// Returns a copy of the bitmap with the size especified or the original bitmap if nothing has to be changed
+// wParam = ResizeBitmap *
+// lParam = NULL
+INT_PTR BmpFilterResizeBitmap(WPARAM wParam,LPARAM lParam);
+
+
+int BmpFilterSaveBitmap(HBITMAP hBmp, char *szFile, int flags);
+#if defined(_UNICODE)
+ int BmpFilterSaveBitmapW(HBITMAP hBmp, wchar_t *wszFile, int flags);
+ #define BmpFilterSaveBitmapT BmpFilterSaveBitmapW
+#else
+ #define BmpFilterSaveBitmapT BmpFilterSaveBitmap
+#endif
+
+HBITMAP CopyBitmapTo32(HBITMAP hBitmap);
+
+BOOL PreMultiply(HBITMAP hBitmap);
+BOOL MakeTransparentBkg(HANDLE hContact, HBITMAP *hBitmap);
+HBITMAP MakeGrayscale(HANDLE hContact, HBITMAP hBitmap);
+DWORD GetImgHash(HBITMAP hBitmap);
+
+int AVS_pathIsAbsolute(const TCHAR *path);
+size_t AVS_pathToRelative(const TCHAR *sPrc, TCHAR *pOut);
+size_t AVS_pathToAbsolute(const TCHAR *pSrc, TCHAR *pOut);
+
+int SaveAvatar( const char* protocol, const TCHAR* tszFileName );
+
+#endif // __IMAGE_UTILS_H__
|