aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/modules/loaders/tga
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libraries/evas/src/modules/loaders/tga/Makefile.am5
-rw-r--r--libraries/evas/src/modules/loaders/tga/Makefile.in11
-rw-r--r--libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c10
3 files changed, 10 insertions, 16 deletions
diff --git a/libraries/evas/src/modules/loaders/tga/Makefile.am b/libraries/evas/src/modules/loaders/tga/Makefile.am
index 4d9e240..7cd8fed 100644
--- a/libraries/evas/src/modules/loaders/tga/Makefile.am
+++ b/libraries/evas/src/modules/loaders/tga/Makefile.am
@@ -8,8 +8,7 @@ AM_CPPFLAGS = \
8@FREETYPE_CFLAGS@ \ 8@FREETYPE_CFLAGS@ \
9@PIXMAN_CFLAGS@ \ 9@PIXMAN_CFLAGS@ \
10@EINA_CFLAGS@ \ 10@EINA_CFLAGS@ \
11@EVIL_CFLAGS@ \ 11@EVIL_CFLAGS@
12@WIN32_CPPFLAGS@
13 12
14if BUILD_LOADER_TGA 13if BUILD_LOADER_TGA
15if !EVAS_STATIC_BUILD_TGA 14if !EVAS_STATIC_BUILD_TGA
@@ -27,7 +26,7 @@ else
27 26
28noinst_LTLIBRARIES = libevas_loader_tga.la 27noinst_LTLIBRARIES = libevas_loader_tga.la
29libevas_loader_tga_la_SOURCES = evas_image_load_tga.c 28libevas_loader_tga_la_SOURCES = evas_image_load_tga.c
30libevas_loader_tga_la_LIBADD = 29libevas_loader_tga_la_LIBADD =
31 30
32endif 31endif
33endif 32endif
diff --git a/libraries/evas/src/modules/loaders/tga/Makefile.in b/libraries/evas/src/modules/loaders/tga/Makefile.in
index 4d822d1..d2a9271 100644
--- a/libraries/evas/src/modules/loaders/tga/Makefile.in
+++ b/libraries/evas/src/modules/loaders/tga/Makefile.in
@@ -181,6 +181,8 @@ EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
181EVIL_CFLAGS = @EVIL_CFLAGS@ 181EVIL_CFLAGS = @EVIL_CFLAGS@
182EVIL_LIBS = @EVIL_LIBS@ 182EVIL_LIBS = @EVIL_LIBS@
183EXEEXT = @EXEEXT@ 183EXEEXT = @EXEEXT@
184EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
185EXOTIC_LIBS = @EXOTIC_LIBS@
184FGREP = @FGREP@ 186FGREP = @FGREP@
185FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ 187FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
186FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ 188FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
@@ -231,6 +233,8 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
231PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ 233PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
232PIXMAN_LIBS = @PIXMAN_LIBS@ 234PIXMAN_LIBS = @PIXMAN_LIBS@
233PKG_CONFIG = @PKG_CONFIG@ 235PKG_CONFIG = @PKG_CONFIG@
236PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
237PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
234PNG_CFLAGS = @PNG_CFLAGS@ 238PNG_CFLAGS = @PNG_CFLAGS@
235PNG_LIBS = @PNG_LIBS@ 239PNG_LIBS = @PNG_LIBS@
236RANLIB = @RANLIB@ 240RANLIB = @RANLIB@
@@ -249,8 +253,6 @@ VERSION = @VERSION@
249VMAJ = @VMAJ@ 253VMAJ = @VMAJ@
250WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ 254WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
251WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ 255WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
252WIN32_CFLAGS = @WIN32_CFLAGS@
253WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
254XCB_CFLAGS = @XCB_CFLAGS@ 256XCB_CFLAGS = @XCB_CFLAGS@
255XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ 257XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
256XCB_GL_LIBS = @XCB_GL_LIBS@ 258XCB_GL_LIBS = @XCB_GL_LIBS@
@@ -324,8 +326,6 @@ evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
324evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ 326evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
325evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ 327evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
326evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ 328evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
327evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
328evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
329evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ 329evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
330evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ 330evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
331evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ 331evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
@@ -416,8 +416,7 @@ AM_CPPFLAGS = \
416@FREETYPE_CFLAGS@ \ 416@FREETYPE_CFLAGS@ \
417@PIXMAN_CFLAGS@ \ 417@PIXMAN_CFLAGS@ \
418@EINA_CFLAGS@ \ 418@EINA_CFLAGS@ \
419@EVIL_CFLAGS@ \ 419@EVIL_CFLAGS@
420@WIN32_CPPFLAGS@
421 420
422@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@pkgdir = $(libdir)/evas/modules/loaders/tga/$(MODULE_ARCH) 421@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@pkgdir = $(libdir)/evas/modules/loaders/tga/$(MODULE_ARCH)
423@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@pkg_LTLIBRARIES = module.la 422@BUILD_LOADER_TGA_TRUE@@EVAS_STATIC_BUILD_TGA_FALSE@pkg_LTLIBRARIES = module.la
diff --git a/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c b/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c
index 9b4073c..bab169b 100644
--- a/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c
+++ b/libraries/evas/src/modules/loaders/tga/evas_image_load_tga.c
@@ -76,10 +76,9 @@ evas_image_load_file_head_tga(Image_Entry *ie, const char *file, const char *key
76 unsigned char *seg = NULL, *filedata; 76 unsigned char *seg = NULL, *filedata;
77 tga_header *header; 77 tga_header *header;
78 tga_footer *footer, tfooter; 78 tga_footer *footer, tfooter;
79 char hasa = 0, footer_present = 0, vinverted = 0; 79 char hasa = 0;
80 int w = 0, h = 0, bpp; 80 int w = 0, h = 0, bpp;
81 int x, y; 81 int x, y;
82 int abits;
83 82
84 f = eina_file_open(file, EINA_FALSE); 83 f = eina_file_open(file, EINA_FALSE);
85 *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; 84 *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
@@ -98,7 +97,7 @@ evas_image_load_file_head_tga(Image_Entry *ie, const char *file, const char *key
98 memcpy((unsigned char *)(&tfooter), 97 memcpy((unsigned char *)(&tfooter),
99 (unsigned char *)footer, 98 (unsigned char *)footer,
100 sizeof(tga_footer)); 99 sizeof(tga_footer));
101 printf("0\n"); 100 //printf("0\n");
102 if (!memcmp(tfooter.signature, TGA_SIGNATURE, sizeof(tfooter.signature))) 101 if (!memcmp(tfooter.signature, TGA_SIGNATURE, sizeof(tfooter.signature)))
103 { 102 {
104 if ((tfooter.dot == '.') && (tfooter.null == 0)) 103 if ((tfooter.dot == '.') && (tfooter.null == 0))
@@ -106,14 +105,12 @@ evas_image_load_file_head_tga(Image_Entry *ie, const char *file, const char *key
106 // footer is there and matches. this is a tga file - any problems now 105 // footer is there and matches. this is a tga file - any problems now
107 // are a corrupt file 106 // are a corrupt file
108 *error = EVAS_LOAD_ERROR_CORRUPT_FILE; 107 *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
109 footer_present = 1;
110 } 108 }
111 } 109 }
112// else goto close_file; 110// else goto close_file;
113 printf("1\n"); 111 //printf("1\n");
114 112
115 filedata = (unsigned char *)filedata + sizeof(tga_header); 113 filedata = (unsigned char *)filedata + sizeof(tga_header);
116 vinverted = !(header->descriptor & TGA_DESC_VERTICAL);
117 switch (header->imageType) 114 switch (header->imageType)
118 { 115 {
119 case TGA_TYPE_COLOR_RLE: 116 case TGA_TYPE_COLOR_RLE:
@@ -131,7 +128,6 @@ evas_image_load_file_head_tga(Image_Entry *ie, const char *file, const char *key
131 if (!((bpp == 32) || (bpp == 24) || (bpp == 16) || (bpp == 8))) 128 if (!((bpp == 32) || (bpp == 24) || (bpp == 16) || (bpp == 8)))
132 goto close_file; 129 goto close_file;
133 if ((bpp == 32) && (header->descriptor & TGA_DESC_ABITS)) hasa = 1; 130 if ((bpp == 32) && (header->descriptor & TGA_DESC_ABITS)) hasa = 1;
134 abits = header->descriptor & TGA_DESC_ABITS;
135 // don't handle colormapped images 131 // don't handle colormapped images
136 if ((header->colorMapType) != 0) 132 if ((header->colorMapType) != 0)
137 goto close_file; 133 goto close_file;