From c9ae9cf2186c0778da20fc4b80fd914c8b60c34d Mon Sep 17 00:00:00 2001 From: Maschell Date: Tue, 18 Feb 2020 00:45:08 +0100 Subject: [PATCH] Allow jpg, bmp and tga files --- source/gui/GuiImageData.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/gui/GuiImageData.cpp b/source/gui/GuiImageData.cpp index 12e2e47..51b8f9b 100644 --- a/source/gui/GuiImageData.cpp +++ b/source/gui/GuiImageData.cpp @@ -80,10 +80,10 @@ void GuiImageData::loadImage(const uint8_t *img, int32_t imgSize, GX2TexClampMod //! not needed for now therefore comment out to safe ELF size //! if needed uncomment, adds 200 kb to the ELF size // IMAGE_JPEG - //gdImg = gdImageCreateFromJpegPtr(imgSize, (uint8_t*) img); + gdImg = gdImageCreateFromJpegPtr(imgSize, (uint8_t*) img); } else if (img[0] == 'B' && img[1] == 'M') { // IMAGE_BMP - //gdImg = gdImageCreateFromBmpPtr(imgSize, (uint8_t*) img); + gdImg = gdImageCreateFromBmpPtr(imgSize, (uint8_t*) img); } else if (img[0] == 0x89 && img[1] == 'P' && img[2] == 'N' && img[3] == 'G') { // IMAGE_PNG gdImg = gdImageCreateFromPngPtr(imgSize, (uint8_t*) img); @@ -91,7 +91,7 @@ void GuiImageData::loadImage(const uint8_t *img, int32_t imgSize, GX2TexClampMod //!This must be last since it can also intefere with outher formats else if(img[0] == 0x00) { // Try loading TGA image - //gdImg = gdImageCreateFromTgaPtr(imgSize, (uint8_t*) img); + gdImg = gdImageCreateFromTgaPtr(imgSize, (uint8_t*) img); } if(gdImg == 0)