summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-02-01 18:05:16 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2021-02-01 18:06:43 +0000
commit9890c2b135f85fbbd3bf1ccfed90597ff65cfa71 (patch)
treebc4033cf9b2c20fadfd2789689200cf3159a4e0a
parent6f803ad233e397709a97a585aede4a8c3c8f0094 (diff)
downloadefl-9890c2b135f85fbbd3bf1ccfed90597ff65cfa71.tar.gz
evas - tga loader - ignore origin as it leads to valid tga's not loading
@fix
-rw-r--r--src/modules/evas/image_loaders/tga/evas_image_load_tga.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/modules/evas/image_loaders/tga/evas_image_load_tga.c b/src/modules/evas/image_loaders/tga/evas_image_load_tga.c
index d8ef67fc59..34ee83e0b1 100644
--- a/src/modules/evas/image_loaders/tga/evas_image_load_tga.c
+++ b/src/modules/evas/image_loaders/tga/evas_image_load_tga.c
@@ -77,7 +77,7 @@ evas_image_load_file_head_tga(void *loader_data,
tga_footer *footer, tfooter;
char hasa = 0;
int w, h, bpp;
- int x, y;
+// int x, y;
Eina_Bool r = EINA_FALSE;
*error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
@@ -104,7 +104,6 @@ evas_image_load_file_head_tga(void *loader_data,
}
}
// else goto close_file;
- //printf("1\n");
filedata = (unsigned char *)filedata + sizeof(tga_header);
switch (header->imageType)
@@ -135,13 +134,14 @@ evas_image_load_file_head_tga(void *loader_data,
(header->colorMapSize == 24) ||
(header->colorMapSize == 32)))
goto close_file;
- x = (header->xOriginHi << 8) | (header->xOriginLo);
- y = (header->yOriginHi << 8) | (header->yOriginLo);
+// x = (header->xOriginHi << 8) | (header->xOriginLo);
+// y = (header->yOriginHi << 8) | (header->yOriginLo);
w = (header->widthHi << 8) | header->widthLo;
h = (header->heightHi << 8) | header->heightLo;
// x origin gerater that width, y origin greater than height - wrong file
- if ((x >= w) || (y >= h))
- goto close_file;
+// if ((x >= w) || (y >= h))
+// goto close_file;
+ printf("x\n");
// if descriptor has either of the top 2 bits set... not tga
if (header->descriptor & 0xc0)
goto close_file;
@@ -237,13 +237,13 @@ evas_image_load_file_data_tga(void *loader_data,
(header->colorMapSize == 24) ||
(header->colorMapSize == 32)))
goto close_file;
- x = (header->xOriginHi << 8) | (header->xOriginLo);
- y = (header->yOriginHi << 8) | (header->yOriginLo);
+// x = (header->xOriginHi << 8) | (header->xOriginLo);
+// y = (header->yOriginHi << 8) | (header->yOriginLo);
w = (header->widthHi << 8) | header->widthLo;
h = (header->heightHi << 8) | header->heightLo;
// x origin gerater that width, y origin greater than height - wrong file
- if ((x >= w) || (y >= h))
- goto close_file;
+// if ((x >= w) || (y >= h))
+// goto close_file;
// if descriptor has either of the top 2 bits set... not tga
if (header->descriptor & 0xc0)
goto close_file;