|
|
@@ -33,11 +33,10 @@ extern "C" { |
|
|
|
|
|
|
|
extern "C" pipi_image_t *pipi_load_gdiplus(const char *name) |
|
|
|
{ |
|
|
|
#if 0 |
|
|
|
size_t len; |
|
|
|
len = mbstowcs(NULL, name, 0); |
|
|
|
wchar_t *wname = new wchar_t[len + 1]; |
|
|
|
if(mbstowcs(wname, name, len + 1) != (size_t)-1) |
|
|
|
if(mbstowcs(wname, name, len + 1) == (size_t)-1) |
|
|
|
{ |
|
|
|
delete[] wname; |
|
|
|
return NULL; |
|
|
@@ -78,13 +77,10 @@ extern "C" pipi_image_t *pipi_load_gdiplus(const char *name) |
|
|
|
img->u8 = 1; |
|
|
|
|
|
|
|
return img; |
|
|
|
#endif |
|
|
|
return NULL; |
|
|
|
} |
|
|
|
|
|
|
|
extern "C" int pipi_save_gdiplus(pipi_image_t *img, const char *name) |
|
|
|
{ |
|
|
|
#if 0 |
|
|
|
wchar_t const *fmt; |
|
|
|
if(strstr(name, ".gif")) |
|
|
|
fmt = L"image/gif"; |
|
|
@@ -117,7 +113,7 @@ extern "C" int pipi_save_gdiplus(pipi_image_t *img, const char *name) |
|
|
|
size_t len; |
|
|
|
len = mbstowcs(NULL, name, 0); |
|
|
|
wchar_t *wname = new wchar_t[len + 1]; |
|
|
|
if(mbstowcs(wname, name, len + 1) != (size_t)-1) |
|
|
|
if(mbstowcs(wname, name, len + 1) == (size_t)-1) |
|
|
|
{ |
|
|
|
delete[] wname; |
|
|
|
return -1; |
|
|
@@ -154,7 +150,6 @@ extern "C" int pipi_save_gdiplus(pipi_image_t *img, const char *name) |
|
|
|
delete[] wname; |
|
|
|
delete b; |
|
|
|
|
|
|
|
#endif |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|