From 138abeab08267606bd11c0679bb6d9708997b7ec Mon Sep 17 00:00:00 2001 From: titan Date: Mon, 14 Feb 2011 17:12:28 +0000 Subject: [PATCH] Use JPEG FORMAT for ethumb where appropriate. SVN revision: 57030 --- src/bin/ephoto_thumb_browser.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c index 34a32fd..4fb918b 100644 --- a/src/bin/ephoto_thumb_browser.c +++ b/src/bin/ephoto_thumb_browser.c @@ -138,8 +138,16 @@ _ephoto_thumbnail_icon_get(void *data, Evas_Object *obj __UNUSED__, const char * { Eina_List *node = data; Evas_Object *o; + const char *ext = strrchr(eina_list_data_get(node), '.'); + + if (ext) + { + if ((!strcasecmp(ext, "jpg")) || (!strcasecmp(ext, "jpeg"))) + ethumb_client_format_set(ephoto->client, ETHUMB_THUMB_JPEG); + } + else + ethumb_client_format_set(ephoto->client, ETHUMB_THUMB_FDO); - ethumb_client_format_set(ephoto->client, ETHUMB_THUMB_FDO); ethumb_client_size_set(ephoto->client, etb->thumb_size, etb->thumb_size); o = elm_thumb_add(ephoto->win);