2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
9 #include "evas_options.h"
11 #include "evas_common.h"
12 #include "evas_private.h"
15 extern Evas_List *evas_modules;
18 evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key, int quality, int compress)
20 Evas_Image_Save_Func *evas_image_save_func = NULL;
24 p = strrchr(file, '.');
29 if (!strcasecmp(p, "png"))
31 if ((!strcasecmp(p, "jpg")) || (!strcasecmp(p, "jpeg")) ||
32 (!strcasecmp(p, "jfif")))
34 if ((!strcasecmp(p, "eet")) || (!strcasecmp(p, "edj")) ||
35 (!strcasecmp(p, "eap")))
37 if (!strcasecmp(p, "edb"))
45 em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_SAVER, saver);
49 if (evas_module_load(em))
51 evas_image_save_func = em->functions;
52 return evas_image_save_func->image_save(im, file, key, quality, compress);