|
|
@@ -27,8 +27,9 @@ pipi_image_t *pipi_load_modular(const char *name) |
|
|
|
|
|
|
|
int pipi_save_modular(pipi_image_t *img, const char *name) |
|
|
|
{ |
|
|
|
if(!strncasecmp(&name[strlen(name) - 3], "jpg", 3) || |
|
|
|
!strncasecmp(&name[strlen(name) - 4], "jpeg", 4) ) |
|
|
|
return pipi_save_jpeg(img, name); |
|
|
|
if(strlen(name) >= 4) |
|
|
|
if(!strncasecmp(&name[strlen(name) - 3], "jpg", 3) || |
|
|
|
!strncasecmp(&name[strlen(name) - 4], "jpeg", 4) ) |
|
|
|
return pipi_save_jpeg(img, name); |
|
|
|
return -1; |
|
|
|
} |