From c2ee4614da32986d542e988d98d5dcf964678e95 Mon Sep 17 00:00:00 2001 From: mataes2007 Date: Wed, 8 Feb 2012 14:28:23 +0000 Subject: Popup: Unicode avatars support git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@268 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- Popup/src/popup_gdiplus.cpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'Popup/src/popup_gdiplus.cpp') diff --git a/Popup/src/popup_gdiplus.cpp b/Popup/src/popup_gdiplus.cpp index ab1c3b2..186fedb 100644 --- a/Popup/src/popup_gdiplus.cpp +++ b/Popup/src/popup_gdiplus.cpp @@ -1,10 +1,10 @@ /* Popup Plus plugin for Miranda IM -Copyright © 2002 Luca Santarelli, - © 2004-2007 Victor Pavlychko - © 2010 MPK - © 2010 Merlin_de +Copyright � 2002 Luca Santarelli, + � 2004-2007 Victor Pavlychko + � 2010 MPK + � 2010 Merlin_de This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -114,12 +114,10 @@ HBITMAP SkinEngine_CreateDIB32(int cx, int cy) } -BOOL GDIPlus_IsAnimatedGIF(char * szName) +BOOL GDIPlus_IsAnimatedGIF(TCHAR * szName) { int nFrameCount=0; - WCHAR * temp= mir_a2u(szName); - Image image(temp); - mir_free(temp); + Image image(szName); UINT count = 0; count = image.GetFrameDimensionsCount(); @@ -136,22 +134,18 @@ BOOL GDIPlus_IsAnimatedGIF(char * szName) return (BOOL) (nFrameCount > 1) && image.GetWidth() && image.GetHeight(); } -void GDIPlus_GetGIFSize(char * szName, int * width, int * height) +void GDIPlus_GetGIFSize(TCHAR * szName, int * width, int * height) { - WCHAR * temp= mir_a2u(szName); - Image image(temp); - mir_free(temp); + Image image(szName); *width = image.GetWidth(); *height = image.GetHeight(); } -void GDIPlus_ExtractAnimatedGIF(char * szName, int width, int height, HBITMAP * pBitmap, int ** pframesDelay, int * pframesCount, SIZE * pSizeAvatar) +void GDIPlus_ExtractAnimatedGIF(TCHAR * szName, int width, int height, HBITMAP * pBitmap, int ** pframesDelay, int * pframesCount, SIZE * pSizeAvatar) { int nFrameCount=0; - WCHAR * temp = mir_a2u(szName); - Bitmap image(temp); - mir_free(temp); + Bitmap image(szName); PropertyItem * pPropertyItem; UINT count = 0; -- cgit v1.2.3