From 99c13615c829f5d64fe10f644aa493be0cd01c15 Mon Sep 17 00:00:00 2001 From: inmarket Date: Thu, 4 Jul 2013 17:00:34 +1000 Subject: Image decoders not setting image type correctly. --- src/gdisp/image_bmp.c | 1 + src/gdisp/image_gif.c | 1 + src/gdisp/image_native.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/gdisp/image_bmp.c b/src/gdisp/image_bmp.c index e54ad5e4..4f50de81 100644 --- a/src/gdisp/image_bmp.c +++ b/src/gdisp/image_bmp.c @@ -407,6 +407,7 @@ gdispImageError gdispImageOpen_BMP(gdispImage *img) { } #endif + img->type = GDISP_IMAGE_TYPE_BMP; return GDISP_IMAGE_ERR_OK; baddatacleanup: diff --git a/src/gdisp/image_gif.c b/src/gdisp/image_gif.c index 3de47d03..ed342b4e 100644 --- a/src/gdisp/image_gif.c +++ b/src/gdisp/image_gif.c @@ -609,6 +609,7 @@ gdispImageError gdispImageOpen_GIF(gdispImage *img) { // Read the first frame descriptor switch(initFrame(img)) { case GDISP_IMAGE_ERR_OK: // Everything OK + img->type = GDISP_IMAGE_TYPE_GIF; return GDISP_IMAGE_ERR_OK; case GDISP_IMAGE_ERR_UNSUPPORTED: // Unsupported gdispImageClose_GIF(img); // Clean up the private data area diff --git a/src/gdisp/image_native.c b/src/gdisp/image_native.c index 694518c6..6bbed3fc 100644 --- a/src/gdisp/image_native.c +++ b/src/gdisp/image_native.c @@ -56,6 +56,7 @@ gdispImageError gdispImageOpen_NATIVE(gdispImage *img) { return GDISP_IMAGE_ERR_NOMEMORY; img->priv->frame0cache = 0; + img->type = GDISP_IMAGE_TYPE_NATIVE; return GDISP_IMAGE_ERR_OK; } -- cgit v1.2.3