diff options
Diffstat (limited to 'libraries/evas/src/lib/engines/common/evas_image_save.c')
-rw-r--r-- | libraries/evas/src/lib/engines/common/evas_image_save.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/libraries/evas/src/lib/engines/common/evas_image_save.c b/libraries/evas/src/lib/engines/common/evas_image_save.c deleted file mode 100644 index d7484c0..0000000 --- a/libraries/evas/src/lib/engines/common/evas_image_save.c +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | #ifdef HAVE_CONFIG_H | ||
2 | # include "config.h" | ||
3 | #endif | ||
4 | |||
5 | #include "evas_options.h" | ||
6 | |||
7 | #include "evas_common.h" | ||
8 | #include "evas_private.h" | ||
9 | |||
10 | |||
11 | int | ||
12 | evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key, int quality, int compress) | ||
13 | { | ||
14 | Evas_Image_Save_Func *evas_image_save_func = NULL; | ||
15 | char *p; | ||
16 | char *saver = NULL; | ||
17 | |||
18 | p = strrchr(file, '.'); | ||
19 | if (p) | ||
20 | { | ||
21 | p++; | ||
22 | |||
23 | if (!strcasecmp(p, "png")) | ||
24 | saver = "png"; | ||
25 | if ((!strcasecmp(p, "jpg")) || (!strcasecmp(p, "jpeg")) || | ||
26 | (!strcasecmp(p, "jfif"))) | ||
27 | saver = "jpeg"; | ||
28 | if ((!strcasecmp(p, "eet")) || (!strcasecmp(p, "edj")) || | ||
29 | (!strcasecmp(p, "eap"))) | ||
30 | saver = "eet"; | ||
31 | if (!strcasecmp(p, "edb")) | ||
32 | saver = "edb"; | ||
33 | } | ||
34 | |||
35 | if (saver) | ||
36 | { | ||
37 | Evas_Module *em; | ||
38 | |||
39 | em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_SAVER, saver); | ||
40 | if (em) | ||
41 | { | ||
42 | evas_module_use(em); | ||
43 | if (evas_module_load(em)) | ||
44 | { | ||
45 | evas_image_save_func = em->functions; | ||
46 | return evas_image_save_func->image_save(im, file, key, quality, compress); | ||
47 | } | ||
48 | } | ||
49 | } | ||
50 | return 0; | ||
51 | } | ||