Image decoders not setting image type correctly.
This commit is contained in:
parent
dd43a37b9b
commit
f7e7a5dae4
3 changed files with 3 additions and 0 deletions
|
@ -407,6 +407,7 @@ gdispImageError gdispImageOpen_BMP(gdispImage *img) {
|
|||
}
|
||||
#endif
|
||||
|
||||
img->type = GDISP_IMAGE_TYPE_BMP;
|
||||
return GDISP_IMAGE_ERR_OK;
|
||||
|
||||
baddatacleanup:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue