diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-20 08:05:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-20 08:05:51 +0000 |
commit | 18540e71624543fd0181b764a6913aa6bf8eb75d (patch) | |
tree | 2fc7dc37339a353b53cbe878138ffd69227accfb /protocols/FacebookRM/utils.cpp | |
parent | a00d983ecdb1d58e2bc7f7b3a6d1b3c2c169ae70 (diff) |
more avatar fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@498 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/utils.cpp')
-rw-r--r-- | protocols/FacebookRM/utils.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/protocols/FacebookRM/utils.cpp b/protocols/FacebookRM/utils.cpp index 248bb432bd..e34238a372 100644 --- a/protocols/FacebookRM/utils.cpp +++ b/protocols/FacebookRM/utils.cpp @@ -423,6 +423,20 @@ void* __fastcall utils::mem::allocate(size_t size) return mir_calloc(size);
}
+struct
+{
+ char *ext;
+ int fmt;
+}
+static formats[] = {
+ { ".png", PA_FORMAT_PNG },
+ { ".jpg", PA_FORMAT_JPEG },
+ { ".jpeg", PA_FORMAT_JPEG },
+ { ".ico", PA_FORMAT_ICON },
+ { ".bmp", PA_FORMAT_BMP },
+ { ".gif", PA_FORMAT_GIF },
+};
+
int ext_to_format(const std::string &ext)
{
for(size_t i=0; i<SIZEOF(formats); i++)
|