From c528efcbd41f2487fb8a97e463b2ccd7748f6e04 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Mon, 2 Jan 2012 14:36:18 +0000 Subject: [PATCH] ephoto: there is an API to know if a file could be displayed by Evas. SVN revision: 66757 --- src/bin/ephoto.h | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h index bd0662e..0ef0e0d 100644 --- a/src/bin/ephoto.h +++ b/src/bin/ephoto.h @@ -175,22 +175,7 @@ _ephoto_eina_file_direct_info_image_useful(const Eina_File_Direct_Info *info) if ((info->type != EINA_FILE_REG) && (info->type != EINA_FILE_UNKNOWN)) return EINA_FALSE; - ext = info->path + info->path_length - 1; - for (; ext > bname; ext--) if (*ext == '.') break; - if (*ext == '.') - { - ext++; - if ((strcasecmp(ext, "jpg") == 0) || - (strcasecmp(ext, "jpeg") == 0) || - (strcasecmp(ext, "png") == 0) || - (strcasecmp(ext, "gif") == 0) || - (strcasecmp(ext, "tif") == 0) || - (strcasecmp(ext, "svg") == 0) || - (strcasecmp(ext, "edj") == 0)) - return EINA_TRUE; - } - - return EINA_FALSE; + return evas_object_image_extension_can_load_get(bname); /* seems that this does not play nice with threads */ //if (!(type = efreet_mime_type_get(info->path))) return EINA_FALSE; //return strncmp(type, "image/", sizeof("image/") - 1) == 0;