summaryrefslogtreecommitdiff
path: root/apps/plugins/imageviewer/image_decoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/imageviewer/image_decoder.c')
-rw-r--r--apps/plugins/imageviewer/image_decoder.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/plugins/imageviewer/image_decoder.c b/apps/plugins/imageviewer/image_decoder.c
index 416bda9e42..eab1c01dbc 100644
--- a/apps/plugins/imageviewer/image_decoder.c
+++ b/apps/plugins/imageviewer/image_decoder.c
@@ -28,8 +28,9 @@ static const char *decoder_names[MAX_IMAGE_TYPES] = {
28 "jpeg", 28 "jpeg",
29 "png", 29 "png",
30#ifdef HAVE_LCD_COLOR 30#ifdef HAVE_LCD_COLOR
31 "ppm" 31 "ppm",
32#endif 32#endif
33 "gif"
33}; 34};
34 35
35/* Check file type by magic number or file extension 36/* Check file type by magic number or file extension
@@ -53,6 +54,7 @@ enum image_type get_image_type(const char *name, bool quiet)
53#ifdef HAVE_LCD_COLOR 54#ifdef HAVE_LCD_COLOR
54 { ".ppm", IMAGE_PPM }, 55 { ".ppm", IMAGE_PPM },
55#endif 56#endif
57 { ".gif", IMAGE_GIF },
56 }; 58 };
57 static const struct { 59 static const struct {
58 char *magic; /* magic number */ 60 char *magic; /* magic number */
@@ -66,6 +68,8 @@ enum image_type get_image_type(const char *name, bool quiet)
66 { "P3", 2, IMAGE_PPM }, 68 { "P3", 2, IMAGE_PPM },
67 { "P6", 2, IMAGE_PPM }, 69 { "P6", 2, IMAGE_PPM },
68#endif 70#endif
71 { "GIF87a", 6, IMAGE_GIF },
72 { "GIF89a", 6, IMAGE_GIF },
69 }; 73 };
70 74
71 enum image_type type = IMAGE_UNKNOWN; 75 enum image_type type = IMAGE_UNKNOWN;