diff options
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++)
|