diff options
author | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
commit | 07274513e984f0b5544586c74508ccd16e7dcafa (patch) | |
tree | b32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/evas/src/modules/loaders/bmp | |
parent | Added Irrlicht 1.8, but without all the Windows binaries. (diff) | |
download | SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2 SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz |
Remove EFL, since it's been released now.
Diffstat (limited to 'libraries/evas/src/modules/loaders/bmp')
-rw-r--r-- | libraries/evas/src/modules/loaders/bmp/Makefile.am | 32 | ||||
-rw-r--r-- | libraries/evas/src/modules/loaders/bmp/Makefile.in | 761 | ||||
-rw-r--r-- | libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c | 1498 |
3 files changed, 0 insertions, 2291 deletions
diff --git a/libraries/evas/src/modules/loaders/bmp/Makefile.am b/libraries/evas/src/modules/loaders/bmp/Makefile.am deleted file mode 100644 index 0a04790..0000000 --- a/libraries/evas/src/modules/loaders/bmp/Makefile.am +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | |||
2 | MAINTAINERCLEANFILES = Makefile.in | ||
3 | |||
4 | AM_CPPFLAGS = \ | ||
5 | -I. \ | ||
6 | -I$(top_srcdir)/src/lib \ | ||
7 | -I$(top_srcdir)/src/lib/include \ | ||
8 | @FREETYPE_CFLAGS@ \ | ||
9 | @PIXMAN_CFLAGS@ \ | ||
10 | @EINA_CFLAGS@ \ | ||
11 | @EVIL_CFLAGS@ | ||
12 | |||
13 | if BUILD_LOADER_BMP | ||
14 | if !EVAS_STATIC_BUILD_BMP | ||
15 | |||
16 | pkgdir = $(libdir)/evas/modules/loaders/bmp/$(MODULE_ARCH) | ||
17 | pkg_LTLIBRARIES = module.la | ||
18 | |||
19 | module_la_SOURCES = evas_image_load_bmp.c | ||
20 | |||
21 | module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ -lm $(top_builddir)/src/lib/libevas.la | ||
22 | module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version | ||
23 | module_la_LIBTOOLFLAGS = --tag=disable-static | ||
24 | |||
25 | else | ||
26 | |||
27 | noinst_LTLIBRARIES = libevas_loader_bmp.la | ||
28 | libevas_loader_bmp_la_SOURCES = evas_image_load_bmp.c | ||
29 | libevas_loader_bmp_la_LIBADD = | ||
30 | |||
31 | endif | ||
32 | endif | ||
diff --git a/libraries/evas/src/modules/loaders/bmp/Makefile.in b/libraries/evas/src/modules/loaders/bmp/Makefile.in deleted file mode 100644 index 40600cc..0000000 --- a/libraries/evas/src/modules/loaders/bmp/Makefile.in +++ /dev/null | |||
@@ -1,761 +0,0 @@ | |||
1 | # Makefile.in generated by automake 1.11.1 from Makefile.am. | ||
2 | # @configure_input@ | ||
3 | |||
4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, | ||
6 | # Inc. | ||
7 | # This Makefile.in is free software; the Free Software Foundation | ||
8 | # gives unlimited permission to copy and/or distribute it, | ||
9 | # with or without modifications, as long as this notice is preserved. | ||
10 | |||
11 | # This program is distributed in the hope that it will be useful, | ||
12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
14 | # PARTICULAR PURPOSE. | ||
15 | |||
16 | @SET_MAKE@ | ||
17 | |||
18 | VPATH = @srcdir@ | ||
19 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
20 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
21 | pkglibdir = $(libdir)/@PACKAGE@ | ||
22 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | ||
23 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
24 | install_sh_DATA = $(install_sh) -c -m 644 | ||
25 | install_sh_PROGRAM = $(install_sh) -c | ||
26 | install_sh_SCRIPT = $(install_sh) -c | ||
27 | INSTALL_HEADER = $(INSTALL_DATA) | ||
28 | transform = $(program_transform_name) | ||
29 | NORMAL_INSTALL = : | ||
30 | PRE_INSTALL = : | ||
31 | POST_INSTALL = : | ||
32 | NORMAL_UNINSTALL = : | ||
33 | PRE_UNINSTALL = : | ||
34 | POST_UNINSTALL = : | ||
35 | build_triplet = @build@ | ||
36 | host_triplet = @host@ | ||
37 | subdir = src/modules/loaders/bmp | ||
38 | DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in | ||
39 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
40 | am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \ | ||
41 | $(top_srcdir)/m4/efl_coverage.m4 \ | ||
42 | $(top_srcdir)/m4/efl_doxygen.m4 \ | ||
43 | $(top_srcdir)/m4/efl_fnmatch.m4 \ | ||
44 | $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \ | ||
45 | $(top_srcdir)/m4/evas_check_engine.m4 \ | ||
46 | $(top_srcdir)/m4/evas_check_loader.m4 \ | ||
47 | $(top_srcdir)/m4/evas_converter.m4 \ | ||
48 | $(top_srcdir)/m4/evas_dither.m4 \ | ||
49 | $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \ | ||
50 | $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ | ||
51 | $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ | ||
52 | $(top_srcdir)/configure.ac | ||
53 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
54 | $(ACLOCAL_M4) | ||
55 | mkinstalldirs = $(install_sh) -d | ||
56 | CONFIG_HEADER = $(top_builddir)/config.h | ||
57 | CONFIG_CLEAN_FILES = | ||
58 | CONFIG_CLEAN_VPATH_FILES = | ||
59 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
60 | am__vpath_adj = case $$p in \ | ||
61 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
62 | *) f=$$p;; \ | ||
63 | esac; | ||
64 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; | ||
65 | am__install_max = 40 | ||
66 | am__nobase_strip_setup = \ | ||
67 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` | ||
68 | am__nobase_strip = \ | ||
69 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" | ||
70 | am__nobase_list = $(am__nobase_strip_setup); \ | ||
71 | for p in $$list; do echo "$$p $$p"; done | \ | ||
72 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ | ||
73 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ | ||
74 | if (++n[$$2] == $(am__install_max)) \ | ||
75 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ | ||
76 | END { for (dir in files) print dir, files[dir] }' | ||
77 | am__base_list = \ | ||
78 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ | ||
79 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | ||
80 | am__installdirs = "$(DESTDIR)$(pkgdir)" | ||
81 | LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES) | ||
82 | libevas_loader_bmp_la_DEPENDENCIES = | ||
83 | am__libevas_loader_bmp_la_SOURCES_DIST = evas_image_load_bmp.c | ||
84 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_TRUE@am_libevas_loader_bmp_la_OBJECTS = evas_image_load_bmp.lo | ||
85 | libevas_loader_bmp_la_OBJECTS = $(am_libevas_loader_bmp_la_OBJECTS) | ||
86 | AM_V_lt = $(am__v_lt_$(V)) | ||
87 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) | ||
88 | am__v_lt_0 = --silent | ||
89 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_TRUE@am_libevas_loader_bmp_la_rpath = | ||
90 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la | ||
91 | am__module_la_SOURCES_DIST = evas_image_load_bmp.c | ||
92 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_bmp.lo | ||
93 | module_la_OBJECTS = $(am_module_la_OBJECTS) | ||
94 | module_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ | ||
95 | $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ | ||
96 | $(AM_CFLAGS) $(CFLAGS) $(module_la_LDFLAGS) $(LDFLAGS) -o $@ | ||
97 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@am_module_la_rpath = \ | ||
98 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@ -rpath \ | ||
99 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@ $(pkgdir) | ||
100 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) | ||
101 | depcomp = $(SHELL) $(top_srcdir)/depcomp | ||
102 | am__depfiles_maybe = depfiles | ||
103 | am__mv = mv -f | ||
104 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
105 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
106 | LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
107 | $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ | ||
108 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ | ||
109 | $(AM_CFLAGS) $(CFLAGS) | ||
110 | AM_V_CC = $(am__v_CC_$(V)) | ||
111 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) | ||
112 | am__v_CC_0 = @echo " CC " $@; | ||
113 | AM_V_at = $(am__v_at_$(V)) | ||
114 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) | ||
115 | am__v_at_0 = @ | ||
116 | CCLD = $(CC) | ||
117 | LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
118 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | ||
119 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
120 | AM_V_CCLD = $(am__v_CCLD_$(V)) | ||
121 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) | ||
122 | am__v_CCLD_0 = @echo " CCLD " $@; | ||
123 | AM_V_GEN = $(am__v_GEN_$(V)) | ||
124 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) | ||
125 | am__v_GEN_0 = @echo " GEN " $@; | ||
126 | SOURCES = $(libevas_loader_bmp_la_SOURCES) $(module_la_SOURCES) | ||
127 | DIST_SOURCES = $(am__libevas_loader_bmp_la_SOURCES_DIST) \ | ||
128 | $(am__module_la_SOURCES_DIST) | ||
129 | ETAGS = etags | ||
130 | CTAGS = ctags | ||
131 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
132 | ACLOCAL = @ACLOCAL@ | ||
133 | ALLOCA = @ALLOCA@ | ||
134 | AMTAR = @AMTAR@ | ||
135 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
136 | AR = @AR@ | ||
137 | AS = @AS@ | ||
138 | AUTOCONF = @AUTOCONF@ | ||
139 | AUTOHEADER = @AUTOHEADER@ | ||
140 | AUTOMAKE = @AUTOMAKE@ | ||
141 | AWK = @AWK@ | ||
142 | CC = @CC@ | ||
143 | CCDEPMODE = @CCDEPMODE@ | ||
144 | CFLAGS = @CFLAGS@ | ||
145 | CHECK_CFLAGS = @CHECK_CFLAGS@ | ||
146 | CHECK_LIBS = @CHECK_LIBS@ | ||
147 | CPP = @CPP@ | ||
148 | CPPFLAGS = @CPPFLAGS@ | ||
149 | CXX = @CXX@ | ||
150 | CXXCPP = @CXXCPP@ | ||
151 | CXXDEPMODE = @CXXDEPMODE@ | ||
152 | CXXFLAGS = @CXXFLAGS@ | ||
153 | CYGPATH_W = @CYGPATH_W@ | ||
154 | DEFS = @DEFS@ | ||
155 | DEPDIR = @DEPDIR@ | ||
156 | DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ | ||
157 | DIRECTFB_LIBS = @DIRECTFB_LIBS@ | ||
158 | DLLTOOL = @DLLTOOL@ | ||
159 | DSYMUTIL = @DSYMUTIL@ | ||
160 | DUMPBIN = @DUMPBIN@ | ||
161 | ECHO_C = @ECHO_C@ | ||
162 | ECHO_N = @ECHO_N@ | ||
163 | ECHO_T = @ECHO_T@ | ||
164 | ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ | ||
165 | ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ | ||
166 | EDB_CFLAGS = @EDB_CFLAGS@ | ||
167 | EDB_LIBS = @EDB_LIBS@ | ||
168 | EDJE_CFLAGS = @EDJE_CFLAGS@ | ||
169 | EDJE_LIBS = @EDJE_LIBS@ | ||
170 | EET_CFLAGS = @EET_CFLAGS@ | ||
171 | EET_LIBS = @EET_LIBS@ | ||
172 | EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ | ||
173 | EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ | ||
174 | EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ | ||
175 | EGREP = @EGREP@ | ||
176 | EINA_CFLAGS = @EINA_CFLAGS@ | ||
177 | EINA_LIBS = @EINA_LIBS@ | ||
178 | EVAS_CFLAGS = @EVAS_CFLAGS@ | ||
179 | EVAS_LIBS = @EVAS_LIBS@ | ||
180 | EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ | ||
181 | EVIL_CFLAGS = @EVIL_CFLAGS@ | ||
182 | EVIL_LIBS = @EVIL_LIBS@ | ||
183 | EXEEXT = @EXEEXT@ | ||
184 | EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ | ||
185 | EXOTIC_LIBS = @EXOTIC_LIBS@ | ||
186 | FGREP = @FGREP@ | ||
187 | FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ | ||
188 | FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ | ||
189 | FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ | ||
190 | FREETYPE_LIBS = @FREETYPE_LIBS@ | ||
191 | FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ | ||
192 | FRIBIDI_LIBS = @FRIBIDI_LIBS@ | ||
193 | GL_EET_CFLAGS = @GL_EET_CFLAGS@ | ||
194 | GL_EET_LIBS = @GL_EET_LIBS@ | ||
195 | GREP = @GREP@ | ||
196 | HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ | ||
197 | HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ | ||
198 | INSTALL = @INSTALL@ | ||
199 | INSTALL_DATA = @INSTALL_DATA@ | ||
200 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
201 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
202 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
203 | LD = @LD@ | ||
204 | LDFLAGS = @LDFLAGS@ | ||
205 | LIBOBJS = @LIBOBJS@ | ||
206 | LIBS = @LIBS@ | ||
207 | LIBTOOL = @LIBTOOL@ | ||
208 | LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ | ||
209 | LINEBREAK_LIBS = @LINEBREAK_LIBS@ | ||
210 | LIPO = @LIPO@ | ||
211 | LN_S = @LN_S@ | ||
212 | LTLIBOBJS = @LTLIBOBJS@ | ||
213 | MAKEINFO = @MAKEINFO@ | ||
214 | MKDIR_P = @MKDIR_P@ | ||
215 | MODULE_ARCH = @MODULE_ARCH@ | ||
216 | NM = @NM@ | ||
217 | NMEDIT = @NMEDIT@ | ||
218 | OBJC = @OBJC@ | ||
219 | OBJCDEPMODE = @OBJCDEPMODE@ | ||
220 | OBJCFLAGS = @OBJCFLAGS@ | ||
221 | OBJDUMP = @OBJDUMP@ | ||
222 | OBJEXT = @OBJEXT@ | ||
223 | OTOOL = @OTOOL@ | ||
224 | OTOOL64 = @OTOOL64@ | ||
225 | PACKAGE = @PACKAGE@ | ||
226 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
227 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
228 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
229 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
230 | PACKAGE_URL = @PACKAGE_URL@ | ||
231 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
232 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
233 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | ||
234 | PIXMAN_LIBS = @PIXMAN_LIBS@ | ||
235 | PKG_CONFIG = @PKG_CONFIG@ | ||
236 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
237 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
238 | PNG_CFLAGS = @PNG_CFLAGS@ | ||
239 | PNG_LIBS = @PNG_LIBS@ | ||
240 | RANLIB = @RANLIB@ | ||
241 | SDL_CFLAGS = @SDL_CFLAGS@ | ||
242 | SDL_LIBS = @SDL_LIBS@ | ||
243 | SED = @SED@ | ||
244 | SET_MAKE = @SET_MAKE@ | ||
245 | SHELL = @SHELL@ | ||
246 | SHM_OPEN_LINK = @SHM_OPEN_LINK@ | ||
247 | STRIP = @STRIP@ | ||
248 | SVG_CFLAGS = @SVG_CFLAGS@ | ||
249 | SVG_LIBS = @SVG_LIBS@ | ||
250 | VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ | ||
251 | VALGRIND_LIBS = @VALGRIND_LIBS@ | ||
252 | VERSION = @VERSION@ | ||
253 | VMAJ = @VMAJ@ | ||
254 | WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ | ||
255 | WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ | ||
256 | XCB_CFLAGS = @XCB_CFLAGS@ | ||
257 | XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ | ||
258 | XCB_GL_LIBS = @XCB_GL_LIBS@ | ||
259 | XCB_LIBS = @XCB_LIBS@ | ||
260 | XEXT_CFLAGS = @XEXT_CFLAGS@ | ||
261 | XEXT_LIBS = @XEXT_LIBS@ | ||
262 | XMKMF = @XMKMF@ | ||
263 | X_CFLAGS = @X_CFLAGS@ | ||
264 | X_EXTRA_LIBS = @X_EXTRA_LIBS@ | ||
265 | X_LIBS = @X_LIBS@ | ||
266 | X_PRE_LIBS = @X_PRE_LIBS@ | ||
267 | abs_builddir = @abs_builddir@ | ||
268 | abs_srcdir = @abs_srcdir@ | ||
269 | abs_top_builddir = @abs_top_builddir@ | ||
270 | abs_top_srcdir = @abs_top_srcdir@ | ||
271 | ac_ct_CC = @ac_ct_CC@ | ||
272 | ac_ct_CXX = @ac_ct_CXX@ | ||
273 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ | ||
274 | ac_ct_OBJC = @ac_ct_OBJC@ | ||
275 | altivec_cflags = @altivec_cflags@ | ||
276 | am__include = @am__include@ | ||
277 | am__leading_dot = @am__leading_dot@ | ||
278 | am__quote = @am__quote@ | ||
279 | am__tar = @am__tar@ | ||
280 | am__untar = @am__untar@ | ||
281 | bindir = @bindir@ | ||
282 | build = @build@ | ||
283 | build_alias = @build_alias@ | ||
284 | build_cpu = @build_cpu@ | ||
285 | build_os = @build_os@ | ||
286 | build_vendor = @build_vendor@ | ||
287 | builddir = @builddir@ | ||
288 | datadir = @datadir@ | ||
289 | datarootdir = @datarootdir@ | ||
290 | dlopen_libs = @dlopen_libs@ | ||
291 | docdir = @docdir@ | ||
292 | dvidir = @dvidir@ | ||
293 | edje_cc = @edje_cc@ | ||
294 | efl_doxygen = @efl_doxygen@ | ||
295 | efl_have_doxygen = @efl_have_doxygen@ | ||
296 | evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ | ||
297 | evas_engine_buffer_libs = @evas_engine_buffer_libs@ | ||
298 | evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ | ||
299 | evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ | ||
300 | evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ | ||
301 | evas_engine_directfb_libs = @evas_engine_directfb_libs@ | ||
302 | evas_engine_fb_cflags = @evas_engine_fb_cflags@ | ||
303 | evas_engine_fb_libs = @evas_engine_fb_libs@ | ||
304 | evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ | ||
305 | evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ | ||
306 | evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ | ||
307 | evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ | ||
308 | evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ | ||
309 | evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ | ||
310 | evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ | ||
311 | evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ | ||
312 | evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ | ||
313 | evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ | ||
314 | evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ | ||
315 | evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ | ||
316 | evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ | ||
317 | evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ | ||
318 | evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ | ||
319 | evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ | ||
320 | evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ | ||
321 | evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ | ||
322 | evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ | ||
323 | evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ | ||
324 | evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ | ||
325 | evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ | ||
326 | evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ | ||
327 | evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ | ||
328 | evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ | ||
329 | evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ | ||
330 | evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ | ||
331 | evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ | ||
332 | evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ | ||
333 | evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ | ||
334 | evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ | ||
335 | evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ | ||
336 | evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ | ||
337 | evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ | ||
338 | evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ | ||
339 | evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ | ||
340 | evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ | ||
341 | evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ | ||
342 | evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ | ||
343 | evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ | ||
344 | evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ | ||
345 | evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ | ||
346 | evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ | ||
347 | evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ | ||
348 | evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ | ||
349 | evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ | ||
350 | evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ | ||
351 | evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ | ||
352 | evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ | ||
353 | evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ | ||
354 | evas_image_loader_png_libs = @evas_image_loader_png_libs@ | ||
355 | evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ | ||
356 | evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ | ||
357 | evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ | ||
358 | evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ | ||
359 | evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ | ||
360 | evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ | ||
361 | evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ | ||
362 | evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ | ||
363 | evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ | ||
364 | evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ | ||
365 | evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ | ||
366 | evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ | ||
367 | exec_prefix = @exec_prefix@ | ||
368 | have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ | ||
369 | have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ | ||
370 | have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ | ||
371 | have_evas_engine_software_x11 = @have_evas_engine_software_x11@ | ||
372 | have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ | ||
373 | have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ | ||
374 | have_lcov = @have_lcov@ | ||
375 | host = @host@ | ||
376 | host_alias = @host_alias@ | ||
377 | host_cpu = @host_cpu@ | ||
378 | host_os = @host_os@ | ||
379 | host_vendor = @host_vendor@ | ||
380 | htmldir = @htmldir@ | ||
381 | includedir = @includedir@ | ||
382 | infodir = @infodir@ | ||
383 | install_sh = @install_sh@ | ||
384 | libdir = @libdir@ | ||
385 | libexecdir = @libexecdir@ | ||
386 | localedir = @localedir@ | ||
387 | localstatedir = @localstatedir@ | ||
388 | lt_ECHO = @lt_ECHO@ | ||
389 | lt_enable_auto_import = @lt_enable_auto_import@ | ||
390 | mandir = @mandir@ | ||
391 | mkdir_p = @mkdir_p@ | ||
392 | oldincludedir = @oldincludedir@ | ||
393 | pdfdir = @pdfdir@ | ||
394 | pkgconfig_requires_private = @pkgconfig_requires_private@ | ||
395 | prefix = @prefix@ | ||
396 | program_transform_name = @program_transform_name@ | ||
397 | psdir = @psdir@ | ||
398 | pthread_cflags = @pthread_cflags@ | ||
399 | pthread_libs = @pthread_libs@ | ||
400 | release_info = @release_info@ | ||
401 | requirement_evas = @requirement_evas@ | ||
402 | sbindir = @sbindir@ | ||
403 | sharedstatedir = @sharedstatedir@ | ||
404 | srcdir = @srcdir@ | ||
405 | sysconfdir = @sysconfdir@ | ||
406 | target_alias = @target_alias@ | ||
407 | top_build_prefix = @top_build_prefix@ | ||
408 | top_builddir = @top_builddir@ | ||
409 | top_srcdir = @top_srcdir@ | ||
410 | version_info = @version_info@ | ||
411 | MAINTAINERCLEANFILES = Makefile.in | ||
412 | AM_CPPFLAGS = \ | ||
413 | -I. \ | ||
414 | -I$(top_srcdir)/src/lib \ | ||
415 | -I$(top_srcdir)/src/lib/include \ | ||
416 | @FREETYPE_CFLAGS@ \ | ||
417 | @PIXMAN_CFLAGS@ \ | ||
418 | @EINA_CFLAGS@ \ | ||
419 | @EVIL_CFLAGS@ | ||
420 | |||
421 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@pkgdir = $(libdir)/evas/modules/loaders/bmp/$(MODULE_ARCH) | ||
422 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@pkg_LTLIBRARIES = module.la | ||
423 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@module_la_SOURCES = evas_image_load_bmp.c | ||
424 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ -lm $(top_builddir)/src/lib/libevas.la | ||
425 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version | ||
426 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static | ||
427 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_TRUE@noinst_LTLIBRARIES = libevas_loader_bmp.la | ||
428 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_TRUE@libevas_loader_bmp_la_SOURCES = evas_image_load_bmp.c | ||
429 | @BUILD_LOADER_BMP_TRUE@@EVAS_STATIC_BUILD_BMP_TRUE@libevas_loader_bmp_la_LIBADD = | ||
430 | all: all-am | ||
431 | |||
432 | .SUFFIXES: | ||
433 | .SUFFIXES: .c .lo .o .obj | ||
434 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
435 | @for dep in $?; do \ | ||
436 | case '$(am__configure_deps)' in \ | ||
437 | *$$dep*) \ | ||
438 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | ||
439 | && { if test -f $@; then exit 0; else break; fi; }; \ | ||
440 | exit 1;; \ | ||
441 | esac; \ | ||
442 | done; \ | ||
443 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/bmp/Makefile'; \ | ||
444 | $(am__cd) $(top_srcdir) && \ | ||
445 | $(AUTOMAKE) --gnu src/modules/loaders/bmp/Makefile | ||
446 | .PRECIOUS: Makefile | ||
447 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
448 | @case '$?' in \ | ||
449 | *config.status*) \ | ||
450 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
451 | *) \ | ||
452 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
453 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
454 | esac; | ||
455 | |||
456 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
457 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
458 | |||
459 | $(top_srcdir)/configure: $(am__configure_deps) | ||
460 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
461 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
462 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
463 | $(am__aclocal_m4_deps): | ||
464 | |||
465 | clean-noinstLTLIBRARIES: | ||
466 | -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) | ||
467 | @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ | ||
468 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
469 | test "$$dir" != "$$p" || dir=.; \ | ||
470 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
471 | rm -f "$${dir}/so_locations"; \ | ||
472 | done | ||
473 | install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) | ||
474 | @$(NORMAL_INSTALL) | ||
475 | test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" | ||
476 | @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ | ||
477 | list2=; for p in $$list; do \ | ||
478 | if test -f $$p; then \ | ||
479 | list2="$$list2 $$p"; \ | ||
480 | else :; fi; \ | ||
481 | done; \ | ||
482 | test -z "$$list2" || { \ | ||
483 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ | ||
484 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ | ||
485 | } | ||
486 | |||
487 | uninstall-pkgLTLIBRARIES: | ||
488 | @$(NORMAL_UNINSTALL) | ||
489 | @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ | ||
490 | for p in $$list; do \ | ||
491 | $(am__strip_dir) \ | ||
492 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ | ||
493 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ | ||
494 | done | ||
495 | |||
496 | clean-pkgLTLIBRARIES: | ||
497 | -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) | ||
498 | @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ | ||
499 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
500 | test "$$dir" != "$$p" || dir=.; \ | ||
501 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
502 | rm -f "$${dir}/so_locations"; \ | ||
503 | done | ||
504 | libevas_loader_bmp.la: $(libevas_loader_bmp_la_OBJECTS) $(libevas_loader_bmp_la_DEPENDENCIES) | ||
505 | $(AM_V_CCLD)$(LINK) $(am_libevas_loader_bmp_la_rpath) $(libevas_loader_bmp_la_OBJECTS) $(libevas_loader_bmp_la_LIBADD) $(LIBS) | ||
506 | module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) | ||
507 | $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) | ||
508 | |||
509 | mostlyclean-compile: | ||
510 | -rm -f *.$(OBJEXT) | ||
511 | |||
512 | distclean-compile: | ||
513 | -rm -f *.tab.c | ||
514 | |||
515 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_bmp.Plo@am__quote@ | ||
516 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_bmp.Plo@am__quote@ | ||
517 | |||
518 | .c.o: | ||
519 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
520 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
521 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
522 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
523 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
524 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
525 | |||
526 | .c.obj: | ||
527 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
528 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
529 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
530 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
531 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
532 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
533 | |||
534 | .c.lo: | ||
535 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
536 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
537 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
538 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
539 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
540 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
541 | |||
542 | module_la-evas_image_load_bmp.lo: evas_image_load_bmp.c | ||
543 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_bmp.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_bmp.Tpo -c -o module_la-evas_image_load_bmp.lo `test -f 'evas_image_load_bmp.c' || echo '$(srcdir)/'`evas_image_load_bmp.c | ||
544 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_bmp.Tpo $(DEPDIR)/module_la-evas_image_load_bmp.Plo | ||
545 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
546 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_bmp.c' object='module_la-evas_image_load_bmp.lo' libtool=yes @AMDEPBACKSLASH@ | ||
547 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
548 | @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_bmp.lo `test -f 'evas_image_load_bmp.c' || echo '$(srcdir)/'`evas_image_load_bmp.c | ||
549 | |||
550 | mostlyclean-libtool: | ||
551 | -rm -f *.lo | ||
552 | |||
553 | clean-libtool: | ||
554 | -rm -rf .libs _libs | ||
555 | |||
556 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
557 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
558 | unique=`for i in $$list; do \ | ||
559 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
560 | done | \ | ||
561 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
562 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
563 | mkid -fID $$unique | ||
564 | tags: TAGS | ||
565 | |||
566 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
567 | $(TAGS_FILES) $(LISP) | ||
568 | set x; \ | ||
569 | here=`pwd`; \ | ||
570 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
571 | unique=`for i in $$list; do \ | ||
572 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
573 | done | \ | ||
574 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
575 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
576 | shift; \ | ||
577 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
578 | test -n "$$unique" || unique=$$empty_fix; \ | ||
579 | if test $$# -gt 0; then \ | ||
580 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
581 | "$$@" $$unique; \ | ||
582 | else \ | ||
583 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
584 | $$unique; \ | ||
585 | fi; \ | ||
586 | fi | ||
587 | ctags: CTAGS | ||
588 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
589 | $(TAGS_FILES) $(LISP) | ||
590 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
591 | unique=`for i in $$list; do \ | ||
592 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
593 | done | \ | ||
594 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
595 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
596 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
597 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
598 | $$unique | ||
599 | |||
600 | GTAGS: | ||
601 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
602 | && $(am__cd) $(top_srcdir) \ | ||
603 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
604 | |||
605 | distclean-tags: | ||
606 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
607 | |||
608 | distdir: $(DISTFILES) | ||
609 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
610 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
611 | list='$(DISTFILES)'; \ | ||
612 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
613 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
614 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
615 | case $$dist_files in \ | ||
616 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
617 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
618 | sort -u` ;; \ | ||
619 | esac; \ | ||
620 | for file in $$dist_files; do \ | ||
621 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
622 | if test -d $$d/$$file; then \ | ||
623 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
624 | if test -d "$(distdir)/$$file"; then \ | ||
625 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
626 | fi; \ | ||
627 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
628 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
629 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
630 | fi; \ | ||
631 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
632 | else \ | ||
633 | test -f "$(distdir)/$$file" \ | ||
634 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
635 | || exit 1; \ | ||
636 | fi; \ | ||
637 | done | ||
638 | check-am: all-am | ||
639 | check: check-am | ||
640 | all-am: Makefile $(LTLIBRARIES) | ||
641 | installdirs: | ||
642 | for dir in "$(DESTDIR)$(pkgdir)"; do \ | ||
643 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
644 | done | ||
645 | install: install-am | ||
646 | install-exec: install-exec-am | ||
647 | install-data: install-data-am | ||
648 | uninstall: uninstall-am | ||
649 | |||
650 | install-am: all-am | ||
651 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
652 | |||
653 | installcheck: installcheck-am | ||
654 | install-strip: | ||
655 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
656 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
657 | `test -z '$(STRIP)' || \ | ||
658 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
659 | mostlyclean-generic: | ||
660 | |||
661 | clean-generic: | ||
662 | |||
663 | distclean-generic: | ||
664 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
665 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
666 | |||
667 | maintainer-clean-generic: | ||
668 | @echo "This command is intended for maintainers to use" | ||
669 | @echo "it deletes files that may require special tools to rebuild." | ||
670 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | ||
671 | clean: clean-am | ||
672 | |||
673 | clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ | ||
674 | clean-pkgLTLIBRARIES mostlyclean-am | ||
675 | |||
676 | distclean: distclean-am | ||
677 | -rm -rf ./$(DEPDIR) | ||
678 | -rm -f Makefile | ||
679 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
680 | distclean-tags | ||
681 | |||
682 | dvi: dvi-am | ||
683 | |||
684 | dvi-am: | ||
685 | |||
686 | html: html-am | ||
687 | |||
688 | html-am: | ||
689 | |||
690 | info: info-am | ||
691 | |||
692 | info-am: | ||
693 | |||
694 | install-data-am: install-pkgLTLIBRARIES | ||
695 | |||
696 | install-dvi: install-dvi-am | ||
697 | |||
698 | install-dvi-am: | ||
699 | |||
700 | install-exec-am: | ||
701 | |||
702 | install-html: install-html-am | ||
703 | |||
704 | install-html-am: | ||
705 | |||
706 | install-info: install-info-am | ||
707 | |||
708 | install-info-am: | ||
709 | |||
710 | install-man: | ||
711 | |||
712 | install-pdf: install-pdf-am | ||
713 | |||
714 | install-pdf-am: | ||
715 | |||
716 | install-ps: install-ps-am | ||
717 | |||
718 | install-ps-am: | ||
719 | |||
720 | installcheck-am: | ||
721 | |||
722 | maintainer-clean: maintainer-clean-am | ||
723 | -rm -rf ./$(DEPDIR) | ||
724 | -rm -f Makefile | ||
725 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
726 | |||
727 | mostlyclean: mostlyclean-am | ||
728 | |||
729 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
730 | mostlyclean-libtool | ||
731 | |||
732 | pdf: pdf-am | ||
733 | |||
734 | pdf-am: | ||
735 | |||
736 | ps: ps-am | ||
737 | |||
738 | ps-am: | ||
739 | |||
740 | uninstall-am: uninstall-pkgLTLIBRARIES | ||
741 | |||
742 | .MAKE: install-am install-strip | ||
743 | |||
744 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
745 | clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ | ||
746 | ctags distclean distclean-compile distclean-generic \ | ||
747 | distclean-libtool distclean-tags distdir dvi dvi-am html \ | ||
748 | html-am info info-am install install-am install-data \ | ||
749 | install-data-am install-dvi install-dvi-am install-exec \ | ||
750 | install-exec-am install-html install-html-am install-info \ | ||
751 | install-info-am install-man install-pdf install-pdf-am \ | ||
752 | install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ | ||
753 | installcheck installcheck-am installdirs maintainer-clean \ | ||
754 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
755 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
756 | tags uninstall uninstall-am uninstall-pkgLTLIBRARIES | ||
757 | |||
758 | |||
759 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
760 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
761 | .NOEXPORT: | ||
diff --git a/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c b/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c deleted file mode 100644 index 9453ceb..0000000 --- a/libraries/evas/src/modules/loaders/bmp/evas_image_load_bmp.c +++ /dev/null | |||
@@ -1,1498 +0,0 @@ | |||
1 | #ifdef HAVE_CONFIG_H | ||
2 | # include <config.h> | ||
3 | #endif | ||
4 | |||
5 | #include <stdio.h> | ||
6 | |||
7 | #ifdef HAVE_EVIL | ||
8 | # include <Evil.h> | ||
9 | #endif | ||
10 | |||
11 | #include <math.h> | ||
12 | |||
13 | #include "evas_common.h" | ||
14 | #include "evas_private.h" | ||
15 | |||
16 | static Eina_Bool evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); | ||
17 | static Eina_Bool evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); | ||
18 | |||
19 | static Evas_Image_Load_Func evas_image_load_bmp_func = | ||
20 | { | ||
21 | EINA_TRUE, | ||
22 | evas_image_load_file_head_bmp, | ||
23 | evas_image_load_file_data_bmp, | ||
24 | NULL, | ||
25 | EINA_FALSE | ||
26 | }; | ||
27 | |||
28 | static Eina_Bool | ||
29 | read_short(unsigned char *map, size_t length, size_t *position, short *ret) | ||
30 | { | ||
31 | unsigned char b[2]; | ||
32 | |||
33 | if (*position + 2 > length) return EINA_FALSE; | ||
34 | b[0] = map[(*position)++]; | ||
35 | b[1] = map[(*position)++]; | ||
36 | *ret = (b[1] << 8) | b[0]; | ||
37 | return EINA_TRUE; | ||
38 | } | ||
39 | |||
40 | static Eina_Bool | ||
41 | read_ushort(unsigned char *map, size_t length, size_t *position, unsigned short *ret) | ||
42 | { | ||
43 | unsigned char b[2]; | ||
44 | |||
45 | if (*position + 2 > length) return EINA_FALSE; | ||
46 | b[0] = map[(*position)++]; | ||
47 | b[1] = map[(*position)++]; | ||
48 | *ret = (b[1] << 8) | b[0]; | ||
49 | return EINA_TRUE; | ||
50 | } | ||
51 | |||
52 | static Eina_Bool | ||
53 | read_int(unsigned char *map, size_t length, size_t *position, int *ret) | ||
54 | { | ||
55 | unsigned char b[4]; | ||
56 | int i; | ||
57 | |||
58 | if (*position + 4 > length) return EINA_FALSE; | ||
59 | for (i = 0; i < 4; i++) | ||
60 | b[i] = map[(*position)++]; | ||
61 | *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); | ||
62 | return EINA_TRUE; | ||
63 | } | ||
64 | |||
65 | static Eina_Bool | ||
66 | read_uint(unsigned char *map, size_t length, size_t *position, unsigned int *ret) | ||
67 | { | ||
68 | unsigned char b[4]; | ||
69 | int i; | ||
70 | |||
71 | if (*position + 4 > length) return EINA_FALSE; | ||
72 | for (i = 0; i < 4; i++) | ||
73 | b[i] = map[(*position)++]; | ||
74 | *ret = ARGB_JOIN(b[3], b[2], b[1], b[0]); | ||
75 | return EINA_TRUE; | ||
76 | } | ||
77 | |||
78 | static Eina_Bool | ||
79 | read_uchar(unsigned char *map, size_t length, size_t *position, unsigned char *ret) | ||
80 | { | ||
81 | if (*position + 1 > length) return EINA_FALSE; | ||
82 | *ret = map[(*position)++]; | ||
83 | return EINA_TRUE; | ||
84 | } | ||
85 | |||
86 | static Eina_Bool | ||
87 | read_skip(size_t length, size_t *position, int skip) | ||
88 | { | ||
89 | if (*position + skip > length) return EINA_FALSE; | ||
90 | *position += skip; | ||
91 | return EINA_TRUE; | ||
92 | } | ||
93 | |||
94 | static Eina_Bool | ||
95 | read_mem(unsigned char *map, size_t length, size_t *position, void *buffer, int size) | ||
96 | { | ||
97 | if (*position + size > length) return EINA_FALSE; | ||
98 | memcpy(buffer, map + *position, size); | ||
99 | *position += size; | ||
100 | return EINA_TRUE; | ||
101 | } | ||
102 | |||
103 | static Eina_Bool | ||
104 | evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) | ||
105 | { | ||
106 | Eina_File *f; | ||
107 | void *map = NULL; | ||
108 | size_t position = 0; | ||
109 | char hasa = 0; | ||
110 | int w = 0, h = 0, bit_count = 0, image_size = 0, comp = 0; | ||
111 | unsigned int offset, head_size, amask = 0; | ||
112 | int fsize = 0; | ||
113 | unsigned int bmpsize; | ||
114 | unsigned short res1, res2; | ||
115 | |||
116 | f = eina_file_open(file, 0); | ||
117 | if (!f) | ||
118 | { | ||
119 | *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; | ||
120 | return EINA_FALSE; | ||
121 | } | ||
122 | |||
123 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
124 | fsize = eina_file_size_get(f); | ||
125 | if (fsize < 2) goto close_file; | ||
126 | |||
127 | map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); | ||
128 | if (!map) goto close_file; | ||
129 | |||
130 | if (strncmp(map, "BM", 2)) goto close_file; // magic number | ||
131 | position += 2; | ||
132 | *error = EVAS_LOAD_ERROR_CORRUPT_FILE; | ||
133 | if (!read_uint(map, fsize, &position, &bmpsize)) goto close_file; | ||
134 | if (!read_ushort(map, fsize, &position, &res1)) goto close_file; | ||
135 | if (!read_ushort(map, fsize, &position, &res2)) goto close_file; | ||
136 | if (!read_uint(map, fsize, &position, &offset)) goto close_file; | ||
137 | if (!read_uint(map, fsize, &position, &head_size)) goto close_file; | ||
138 | if (head_size == 12) // OS/2 V1 + Windows 3.0 | ||
139 | { | ||
140 | short tmp; | ||
141 | |||
142 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
143 | w = tmp; // width | ||
144 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
145 | h = tmp; // height | ||
146 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
147 | //planes = tmp; // must be 1 | ||
148 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
149 | bit_count = tmp; // bits per pixel: 1, 4, 8 & 24 | ||
150 | } | ||
151 | else if (head_size == 64) // OS/2 V2 | ||
152 | { | ||
153 | short tmp; | ||
154 | int tmp2; | ||
155 | |||
156 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
157 | w = tmp2; // width | ||
158 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
159 | h = tmp2; // height | ||
160 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
161 | //planes = tmp; // must be 1 | ||
162 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
163 | bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 | ||
164 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
165 | comp = tmp2; // compression method | ||
166 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
167 | image_size = tmp2; // bitmap data size | ||
168 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
169 | //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter | ||
170 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
171 | //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter | ||
172 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
173 | //palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) | ||
174 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
175 | //important_colors = tmp2; // number of important colors - 0 if all | ||
176 | if (!read_skip(fsize, &position, 24)) goto close_file; // skip unused header | ||
177 | if (image_size == 0) image_size = fsize - offset; | ||
178 | } | ||
179 | else if (head_size == 40) // Windows 3.0 + (v3) | ||
180 | { | ||
181 | short tmp; | ||
182 | int tmp2; | ||
183 | |||
184 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
185 | w = tmp2; // width | ||
186 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
187 | h = tmp2; // height | ||
188 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
189 | //planes = tmp; // must be 1 | ||
190 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
191 | bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 | ||
192 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
193 | comp = tmp2; // compression method | ||
194 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
195 | image_size = tmp2; // bitmap data size | ||
196 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
197 | //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter | ||
198 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
199 | //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter | ||
200 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
201 | //palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) | ||
202 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
203 | //important_colors = tmp2; // number of important colors - 0 if all | ||
204 | if (image_size == 0) image_size = fsize - offset; | ||
205 | if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to store it this way | ||
206 | } | ||
207 | else if (head_size == 108) // Windows 95/NT4 + (v4) | ||
208 | { | ||
209 | short tmp; | ||
210 | int tmp2; | ||
211 | |||
212 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
213 | w = tmp2; // width | ||
214 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
215 | h = tmp2; // height | ||
216 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
217 | //planes = tmp; // must be 1 | ||
218 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
219 | bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 | ||
220 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
221 | comp = tmp2; // compression method | ||
222 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
223 | image_size = tmp2; // bitmap data size | ||
224 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
225 | //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter | ||
226 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
227 | //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter | ||
228 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
229 | //palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) | ||
230 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
231 | //important_colors = tmp2; // number of important colors - 0 if all | ||
232 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
233 | //rmask = tmp2; // red mask | ||
234 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
235 | //gmask = tmp2; // green mask | ||
236 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
237 | //bmask = tmp2; // blue mask | ||
238 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
239 | amask = tmp2; // alpha mask | ||
240 | if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie | ||
241 | if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma | ||
242 | if (image_size == 0) image_size = fsize - offset; | ||
243 | if ((amask) && (bit_count == 32)) hasa = 1; | ||
244 | } | ||
245 | else if (head_size == 124) // Windows 98/2000 + (v5) | ||
246 | { | ||
247 | short tmp; | ||
248 | int tmp2; | ||
249 | |||
250 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
251 | w = tmp2; // width | ||
252 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
253 | h = tmp2; // height | ||
254 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
255 | //planes = tmp; // must be 1 | ||
256 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
257 | bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 | ||
258 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
259 | comp = tmp2; // compression method | ||
260 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
261 | //image_size = tmp2; // bitmap data size | ||
262 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
263 | //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter | ||
264 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
265 | //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter | ||
266 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
267 | //palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) | ||
268 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
269 | //important_colors = tmp2; // number of important colors - 0 if all | ||
270 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
271 | //rmask = tmp2; // red mask | ||
272 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
273 | //gmask = tmp2; // green mask | ||
274 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
275 | //bmask = tmp2; // blue mask | ||
276 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
277 | amask = tmp2; // alpha mask | ||
278 | if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie | ||
279 | if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma | ||
280 | if (!read_skip(fsize, &position, 16)) goto close_file; // skip others | ||
281 | if (image_size == 0) image_size = fsize - offset; | ||
282 | if ((amask) && (bit_count == 32)) hasa = 1; | ||
283 | } | ||
284 | else | ||
285 | goto close_file; | ||
286 | |||
287 | if (h < 0) | ||
288 | { | ||
289 | h = -h; | ||
290 | //right_way_up = 1; | ||
291 | } | ||
292 | |||
293 | if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || | ||
294 | IMG_TOO_BIG(w, h)) | ||
295 | { | ||
296 | if (IMG_TOO_BIG(w, h)) | ||
297 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
298 | else | ||
299 | *error = EVAS_LOAD_ERROR_GENERIC; | ||
300 | goto close_file; | ||
301 | } | ||
302 | /* It is not bad idea that bmp loader support scale down decoding | ||
303 | * because of memory issue in mobile world.*/ | ||
304 | if (ie->load_opts.scale_down_by > 1) | ||
305 | { | ||
306 | w /= ie->load_opts.scale_down_by; | ||
307 | h /= ie->load_opts.scale_down_by; | ||
308 | } | ||
309 | |||
310 | if (bit_count < 16) | ||
311 | { | ||
312 | //if ((palette_size < 0) || (palette_size > 256)) pal_num = 256; | ||
313 | //else pal_num = palette_size; | ||
314 | if (bit_count == 1) | ||
315 | { | ||
316 | if (comp == 0) // no compression | ||
317 | { | ||
318 | } | ||
319 | else | ||
320 | goto close_file; | ||
321 | } | ||
322 | else if (bit_count == 4) | ||
323 | { | ||
324 | if (comp == 0) // no compression | ||
325 | { | ||
326 | } | ||
327 | else if (comp == 2) // rle 4bit/pixel | ||
328 | { | ||
329 | } | ||
330 | else | ||
331 | goto close_file; | ||
332 | } | ||
333 | else if (bit_count == 8) | ||
334 | { | ||
335 | if (comp == 0) // no compression | ||
336 | { | ||
337 | } | ||
338 | else if (comp == 1) // rle 8bit/pixel | ||
339 | { | ||
340 | } | ||
341 | else | ||
342 | goto close_file; | ||
343 | } | ||
344 | } | ||
345 | else if ((bit_count == 16) || (bit_count == 24) || (bit_count == 32)) | ||
346 | { | ||
347 | if (comp == 0) // no compression | ||
348 | { | ||
349 | // handled | ||
350 | } | ||
351 | else if (comp == 3) // bit field | ||
352 | { | ||
353 | // handled | ||
354 | } | ||
355 | else if (comp == 4) // jpeg - only printer drivers | ||
356 | goto close_file; | ||
357 | else if (comp == 3) // png - only printer drivers | ||
358 | goto close_file; | ||
359 | else | ||
360 | goto close_file; | ||
361 | } | ||
362 | else | ||
363 | goto close_file; | ||
364 | |||
365 | ie->w = w; | ||
366 | ie->h = h; | ||
367 | if (hasa) ie->flags.alpha = 1; | ||
368 | |||
369 | eina_file_map_free(f, map); | ||
370 | eina_file_close(f); | ||
371 | *error = EVAS_LOAD_ERROR_NONE; | ||
372 | return EINA_TRUE; | ||
373 | |||
374 | close_file: | ||
375 | if (map) eina_file_map_free(f, map); | ||
376 | eina_file_close(f); | ||
377 | return EINA_FALSE; | ||
378 | } | ||
379 | |||
380 | static Eina_Bool | ||
381 | evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) | ||
382 | { | ||
383 | Eina_File *f; | ||
384 | void *map = NULL; | ||
385 | size_t position = 0; | ||
386 | unsigned char *buffer = NULL, *buffer_end = NULL, *p; | ||
387 | char hasa = 0; | ||
388 | int x = 0, y = 0, w = 0, h = 0, bit_count = 0, image_size = 0, | ||
389 | comp = 0, palette_size = -1; | ||
390 | unsigned int offset = 0, head_size = 0; | ||
391 | unsigned int *pal = NULL, pal_num = 0, *pix = NULL, *surface = NULL, fix, | ||
392 | rmask = 0, gmask = 0, bmask = 0, amask = 0; | ||
393 | int right_way_up = 0; | ||
394 | unsigned char r, g, b, a; | ||
395 | int fsize = 0; | ||
396 | unsigned int bmpsize; | ||
397 | unsigned short res1, res2; | ||
398 | |||
399 | /* for scale decoding */ | ||
400 | unsigned int *scale_surface = NULL, *scale_pix = NULL; | ||
401 | int scale_ratio = 1, image_w = 0, image_h = 0; | ||
402 | int row_size = 0; /* Row size is rounded up to a multiple of 4bytes */ | ||
403 | int read_line = 0; /* total read line */ | ||
404 | |||
405 | f = eina_file_open(file, 0); | ||
406 | if (!f) | ||
407 | { | ||
408 | *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; | ||
409 | return EINA_FALSE; | ||
410 | } | ||
411 | |||
412 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
413 | fsize = eina_file_size_get(f); | ||
414 | if (fsize < 2) goto close_file; | ||
415 | |||
416 | map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL); | ||
417 | if (!map) goto close_file; | ||
418 | |||
419 | if (strncmp(map, "BM", 2)) goto close_file; // magic number | ||
420 | position += 2; | ||
421 | *error = EVAS_LOAD_ERROR_CORRUPT_FILE; | ||
422 | if (!read_uint(map, fsize, &position, &bmpsize)) goto close_file; | ||
423 | if (!read_ushort(map, fsize, &position, &res1)) goto close_file; | ||
424 | if (!read_ushort(map, fsize, &position, &res2)) goto close_file; | ||
425 | if (!read_uint(map, fsize, &position, &offset)) goto close_file; | ||
426 | if (!read_uint(map, fsize, &position, &head_size)) goto close_file; | ||
427 | image_size = fsize - offset; | ||
428 | if (image_size < 1) goto close_file; | ||
429 | |||
430 | if (head_size == 12) // OS/2 V1 + Windows 3.0 | ||
431 | { | ||
432 | short tmp; | ||
433 | |||
434 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
435 | w = tmp; // width | ||
436 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
437 | h = tmp; // height | ||
438 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
439 | //planes = tmp; // must be 1 | ||
440 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
441 | bit_count = tmp; // bits per pixel: 1, 4, 8 & 24 | ||
442 | } | ||
443 | else if (head_size == 64) // OS/2 V2 | ||
444 | { | ||
445 | short tmp; | ||
446 | int tmp2; | ||
447 | |||
448 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
449 | w = tmp2; // width | ||
450 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
451 | h = tmp2; // height | ||
452 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
453 | //planes = tmp; // must be 1 | ||
454 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
455 | bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 | ||
456 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
457 | comp = tmp2; // compression method | ||
458 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
459 | image_size = tmp2; // bitmap data size | ||
460 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
461 | //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter | ||
462 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
463 | //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter | ||
464 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
465 | palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) | ||
466 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
467 | //important_colors = tmp2; // number of important colors - 0 if all | ||
468 | if (!read_skip(fsize, &position, 24)) goto close_file; // skip unused header | ||
469 | if (image_size == 0) image_size = fsize - offset; | ||
470 | } | ||
471 | else if (head_size == 40) // Windows 3.0 + (v3) | ||
472 | { | ||
473 | short tmp; | ||
474 | int tmp2; | ||
475 | |||
476 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
477 | w = tmp2; // width | ||
478 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
479 | h = tmp2; // height | ||
480 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
481 | //planes = tmp; // must be 1 | ||
482 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
483 | bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 | ||
484 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
485 | comp = tmp2; // compression method | ||
486 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
487 | image_size = tmp2; // bitmap data size | ||
488 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
489 | //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter | ||
490 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
491 | //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter | ||
492 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
493 | palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) | ||
494 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
495 | //important_colors = tmp2; // number of important colors - 0 if all | ||
496 | if (image_size == 0) image_size = fsize - offset; | ||
497 | if ((comp == 0) && (bit_count == 32)) hasa = 1; // GIMP seems to store it this way | ||
498 | } | ||
499 | else if (head_size == 108) // Windows 95/NT4 + (v4) | ||
500 | { | ||
501 | short tmp; | ||
502 | int tmp2; | ||
503 | |||
504 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
505 | w = tmp2; // width | ||
506 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
507 | h = tmp2; // height | ||
508 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
509 | //planes = tmp; // must be 1 | ||
510 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
511 | bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 | ||
512 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
513 | comp = tmp2; // compression method | ||
514 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
515 | image_size = tmp2; // bitmap data size | ||
516 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
517 | //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter | ||
518 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
519 | //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter | ||
520 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
521 | palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) | ||
522 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
523 | //important_colors = tmp2; // number of important colors - 0 if all | ||
524 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
525 | rmask = tmp2; // red mask | ||
526 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
527 | gmask = tmp2; // green mask | ||
528 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
529 | bmask = tmp2; // blue mask | ||
530 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
531 | amask = tmp2; // alpha mask | ||
532 | if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie | ||
533 | if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma | ||
534 | if (image_size == 0) image_size = fsize - offset; | ||
535 | if ((amask) && (bit_count == 32)) hasa = 1; | ||
536 | } | ||
537 | else if (head_size == 124) // Windows 98/2000 + (v5) | ||
538 | { | ||
539 | short tmp; | ||
540 | int tmp2; | ||
541 | |||
542 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
543 | w = tmp2; // width | ||
544 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
545 | h = tmp2; // height | ||
546 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
547 | //planes = tmp; // must be 1 | ||
548 | if (!read_short(map, fsize, &position, &tmp)) goto close_file; | ||
549 | bit_count = tmp; // bits per pixel: 1, 4, 8, 16, 24 & 32 | ||
550 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
551 | comp = tmp2; // compression method | ||
552 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
553 | image_size = tmp2; // bitmap data size | ||
554 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
555 | //hdpi = (tmp2 * 254) / 10000; // horizontal pixels/meter | ||
556 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
557 | //vdpi = (tmp2 * 254) / 10000; // vertical pixles/meter | ||
558 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
559 | palette_size = tmp2; // number of palette colors power (2^n - so 0 - 8) | ||
560 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
561 | //important_colors = tmp2; // number of important colors - 0 if all | ||
562 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
563 | rmask = tmp2; // red mask | ||
564 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
565 | gmask = tmp2; // green mask | ||
566 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
567 | bmask = tmp2; // blue mask | ||
568 | if (!read_int(map, fsize, &position, &tmp2)) goto close_file; | ||
569 | amask = tmp2; // alpha mask | ||
570 | if (!read_skip(fsize, &position, 36)) goto close_file; // skip unused cie | ||
571 | if (!read_skip(fsize, &position, 12)) goto close_file; // skip unused gamma | ||
572 | if (!read_skip(fsize, &position, 16)) goto close_file; // skip others | ||
573 | if (image_size == 0) image_size = fsize - offset; | ||
574 | if ((amask) && (bit_count == 32)) hasa = 1; | ||
575 | } | ||
576 | else | ||
577 | goto close_file; | ||
578 | |||
579 | if (h < 0) | ||
580 | { | ||
581 | h = -h; | ||
582 | right_way_up = 1; | ||
583 | } | ||
584 | if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || | ||
585 | IMG_TOO_BIG(w, h)) | ||
586 | { | ||
587 | if (IMG_TOO_BIG(w, h)) | ||
588 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
589 | else | ||
590 | *error = EVAS_LOAD_ERROR_GENERIC; | ||
591 | goto close_file; | ||
592 | } | ||
593 | /* It is not bad idea that bmp loader support scale down decoding | ||
594 | * because of memory issue in mobile world. */ | ||
595 | if (ie->load_opts.scale_down_by > 1) | ||
596 | scale_ratio = ie->load_opts.scale_down_by; | ||
597 | image_w = w; | ||
598 | image_h = h; | ||
599 | |||
600 | if (scale_ratio > 1) | ||
601 | { | ||
602 | w /= scale_ratio; | ||
603 | h /= scale_ratio; | ||
604 | |||
605 | if ((w < 1) || (h < 1) ) | ||
606 | { | ||
607 | *error = EVAS_LOAD_ERROR_GENERIC; | ||
608 | goto close_file; | ||
609 | } | ||
610 | } | ||
611 | |||
612 | if ((w != (int)ie->w) || (h != (int)ie->h)) | ||
613 | { | ||
614 | *error = EVAS_LOAD_ERROR_GENERIC; | ||
615 | goto close_file; | ||
616 | } | ||
617 | evas_cache_image_surface_alloc(ie, ie->w, ie->h); | ||
618 | surface = evas_cache_image_pixels(ie); | ||
619 | if (!surface) | ||
620 | { | ||
621 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
622 | goto close_file; | ||
623 | } | ||
624 | |||
625 | row_size = ceil((double)(image_w * bit_count) / 32) * 4; | ||
626 | |||
627 | if (bit_count < 16) | ||
628 | { | ||
629 | unsigned int i; | ||
630 | |||
631 | if (bit_count == 1) | ||
632 | { | ||
633 | if ((palette_size <= 0) || (palette_size > 2)) pal_num = 2; | ||
634 | else pal_num = palette_size; | ||
635 | } | ||
636 | else if (bit_count == 4) | ||
637 | { | ||
638 | if ((palette_size <= 0) || (palette_size > 16)) pal_num = 16; | ||
639 | else pal_num = palette_size; | ||
640 | } | ||
641 | else if (bit_count == 8) | ||
642 | { | ||
643 | if ((palette_size <= 0) || (palette_size > 256)) pal_num = 256; | ||
644 | else pal_num = palette_size; | ||
645 | } | ||
646 | pal = alloca(256 * 4); | ||
647 | for (i = 0; i < pal_num; i++) | ||
648 | { | ||
649 | if (!read_uchar(map, fsize, &position, &b)) goto close_file; | ||
650 | if (!read_uchar(map, fsize, &position, &g)) goto close_file; | ||
651 | if (!read_uchar(map, fsize, &position, &r)) goto close_file; | ||
652 | if ((head_size != 12) /*&& (palette_size != 0)*/) | ||
653 | { // OS/2 V1 doesn't do the pad byte | ||
654 | if (!read_uchar(map, fsize, &position, &a)) goto close_file; | ||
655 | } | ||
656 | a = 0xff; // fillin a as solid for paletted images | ||
657 | pal[i] = ARGB_JOIN(a, r, g, b); | ||
658 | } | ||
659 | position = offset; | ||
660 | |||
661 | if ((scale_ratio == 1) || (comp !=0)) | ||
662 | buffer = malloc(image_size + 8); // add 8 for padding to avoid checks | ||
663 | else | ||
664 | { | ||
665 | scale_surface = malloc(image_w * sizeof(DATA32)); //for one line decoding | ||
666 | if (!scale_surface) | ||
667 | { | ||
668 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
669 | goto close_file; | ||
670 | } | ||
671 | buffer = malloc(row_size); // scale down is usually set because of memory issue, so read line by line | ||
672 | } | ||
673 | |||
674 | if (!buffer) | ||
675 | { | ||
676 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
677 | goto close_file; | ||
678 | } | ||
679 | if ((scale_ratio == 1) || (comp !=0)) | ||
680 | buffer_end = buffer + image_size; | ||
681 | else | ||
682 | buffer_end = buffer + row_size; | ||
683 | p = buffer; | ||
684 | |||
685 | if ((scale_ratio == 1) || (comp !=0)) | ||
686 | { | ||
687 | if (!read_mem(map, fsize, &position, buffer, image_size)) goto close_file; | ||
688 | } | ||
689 | else | ||
690 | { | ||
691 | if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; | ||
692 | } | ||
693 | |||
694 | if (bit_count == 1) | ||
695 | { | ||
696 | if (comp == 0) // no compression | ||
697 | { | ||
698 | pix = surface; | ||
699 | |||
700 | for (y = 0; y < h; y++) | ||
701 | { | ||
702 | if (!right_way_up) pix = surface + ((h - 1 - y) * w); | ||
703 | if (scale_ratio > 1) pix = scale_surface; // one line decoding | ||
704 | |||
705 | for (x = 0; x < image_w; x++) | ||
706 | { | ||
707 | if ((x & 0x7) == 0x0) | ||
708 | { | ||
709 | *pix = pal[*p >> 7]; | ||
710 | } | ||
711 | else if ((x & 0x7) == 0x1) | ||
712 | { | ||
713 | *pix = pal[(*p >> 6) & 0x1]; | ||
714 | } | ||
715 | else if ((x & 0x7) == 0x2) | ||
716 | { | ||
717 | *pix = pal[(*p >> 5) & 0x1]; | ||
718 | } | ||
719 | else if ((x & 0x7) == 0x3) | ||
720 | { | ||
721 | *pix = pal[(*p >> 4) & 0x1]; | ||
722 | } | ||
723 | else if ((x & 0x7) == 0x4) | ||
724 | { | ||
725 | *pix = pal[(*p >> 3) & 0x1]; | ||
726 | } | ||
727 | else if ((x & 0x7) == 0x5) | ||
728 | { | ||
729 | *pix = pal[(*p >> 2) & 0x1]; | ||
730 | } | ||
731 | else if ((x & 0x7) == 0x6) | ||
732 | { | ||
733 | *pix = pal[(*p >> 1) & 0x1]; | ||
734 | } | ||
735 | else | ||
736 | { | ||
737 | *pix = pal[*p & 0x1]; | ||
738 | p++; | ||
739 | } | ||
740 | if (p >= buffer_end) break; | ||
741 | pix++; | ||
742 | } | ||
743 | |||
744 | if (scale_ratio > 1) | ||
745 | { | ||
746 | if (!right_way_up) scale_pix = surface + ((h - 1 - y) * w); | ||
747 | else scale_pix = surface + (y * w); | ||
748 | |||
749 | pix = scale_surface; | ||
750 | for (x = 0; x < w; x++) | ||
751 | { | ||
752 | *scale_pix = *pix; | ||
753 | scale_pix ++; | ||
754 | pix += scale_ratio; | ||
755 | } | ||
756 | read_line += scale_ratio; | ||
757 | if (read_line >= image_h) break; | ||
758 | |||
759 | position += row_size * (scale_ratio - 1); | ||
760 | if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; | ||
761 | p = buffer; | ||
762 | buffer_end = buffer + row_size; | ||
763 | } | ||
764 | else | ||
765 | { | ||
766 | if ((x & 0x7) != 0) p++; | ||
767 | fix = (int)(((unsigned long)p) & 0x3); | ||
768 | if (fix > 0) p += 4 - fix; // align row read | ||
769 | if (p >= buffer_end) break; | ||
770 | } | ||
771 | } | ||
772 | } | ||
773 | else | ||
774 | goto close_file; | ||
775 | } | ||
776 | else if (bit_count == 4) | ||
777 | { | ||
778 | if (comp == 0) // no compression | ||
779 | { | ||
780 | pix = surface; | ||
781 | for (y = 0; y < h; y++) | ||
782 | { | ||
783 | if (!right_way_up) pix = surface + ((h - 1 - y) * w); | ||
784 | if (scale_ratio > 1) pix = scale_surface; // one line decoding | ||
785 | for (x = 0; x < image_w; x++) | ||
786 | { | ||
787 | if ((x & 0x1) == 0x1) | ||
788 | { | ||
789 | *pix = pal[*p & 0x0f]; | ||
790 | p++; | ||
791 | } | ||
792 | else | ||
793 | { | ||
794 | *pix = pal[*p >> 4]; | ||
795 | } | ||
796 | if (p >= buffer_end) break; | ||
797 | pix++; | ||
798 | } | ||
799 | if (scale_ratio > 1) | ||
800 | { | ||
801 | if (!right_way_up) scale_pix = surface + ((h - 1 - y) * w); | ||
802 | else scale_pix = surface + (y * w); | ||
803 | |||
804 | pix = scale_surface; | ||
805 | for (x = 0; x < w; x++) | ||
806 | { | ||
807 | *scale_pix = *pix; | ||
808 | scale_pix ++; | ||
809 | pix += scale_ratio; | ||
810 | } | ||
811 | read_line += scale_ratio; | ||
812 | if (read_line >= image_h) break; | ||
813 | |||
814 | position += row_size * (scale_ratio - 1); | ||
815 | if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; | ||
816 | p = buffer; | ||
817 | buffer_end = buffer + row_size; | ||
818 | } | ||
819 | else | ||
820 | { | ||
821 | if ((x & 0x1) != 0) p++; | ||
822 | fix = (int)(((unsigned long)p) & 0x3); | ||
823 | if (fix > 0) p += 4 - fix; // align row read | ||
824 | if (p >= buffer_end) break; | ||
825 | } | ||
826 | } | ||
827 | } | ||
828 | else if (comp == 2) // rle 4bit/pixel | ||
829 | { | ||
830 | int count = 0, done = 0, wpad; | ||
831 | int scale_x = 0, scale_y = 0; | ||
832 | Eina_Bool scale_down_line = EINA_TRUE; | ||
833 | |||
834 | pix = surface; | ||
835 | if (!right_way_up) pix = surface + ((h - 1 - y) * w); | ||
836 | wpad = ((image_w + 1) / 2) * 2; | ||
837 | while (p < buffer_end) | ||
838 | { | ||
839 | if (p[0]) | ||
840 | { | ||
841 | if (scale_down_line) | ||
842 | { | ||
843 | if ((x + p[0]) <= wpad) | ||
844 | { | ||
845 | unsigned int col1 = pal[p[1] >> 4]; | ||
846 | unsigned int col2 = pal[p[1] & 0xf]; | ||
847 | |||
848 | count = p[0] / 2; | ||
849 | while (count > 0) | ||
850 | { | ||
851 | if (x < w) | ||
852 | { | ||
853 | if (((x % scale_ratio) == 0) && (scale_x < w)) | ||
854 | { | ||
855 | *pix = col1; | ||
856 | pix++; | ||
857 | scale_x++; | ||
858 | } | ||
859 | x++; | ||
860 | } | ||
861 | if (x < w) | ||
862 | { | ||
863 | if (((x % scale_ratio) == 0) && (scale_x < w)) | ||
864 | { | ||
865 | *pix = col2; | ||
866 | pix++; | ||
867 | scale_x++; | ||
868 | } | ||
869 | x++; | ||
870 | } | ||
871 | count--; | ||
872 | } | ||
873 | if (p[0] & 0x1) | ||
874 | { | ||
875 | if (((x % scale_ratio) == 0) && (scale_x < w)) | ||
876 | { | ||
877 | *pix = col1; | ||
878 | pix++; | ||
879 | scale_x++; | ||
880 | } | ||
881 | x++; | ||
882 | } | ||
883 | } | ||
884 | } | ||
885 | p += 2; | ||
886 | } | ||
887 | else | ||
888 | { | ||
889 | switch (p[1]) | ||
890 | { | ||
891 | case 0: // EOL | ||
892 | x = 0; | ||
893 | scale_x = 0; | ||
894 | y++; | ||
895 | if ((y % scale_ratio) == 0) | ||
896 | { | ||
897 | scale_y++; | ||
898 | scale_down_line = EINA_TRUE; | ||
899 | if (!right_way_up) | ||
900 | pix = surface + ((h - 1 - scale_y) * w); | ||
901 | else | ||
902 | pix = surface + (scale_y * w); | ||
903 | } | ||
904 | else | ||
905 | scale_down_line = EINA_FALSE; | ||
906 | if (scale_y >= h) | ||
907 | { | ||
908 | p = buffer_end; | ||
909 | } | ||
910 | p += 2; | ||
911 | break; | ||
912 | case 1: // EOB | ||
913 | p = buffer_end; | ||
914 | break; | ||
915 | case 2: // DELTA | ||
916 | x += p[2]; | ||
917 | y += p[3]; | ||
918 | scale_x = x / scale_ratio; | ||
919 | scale_y = y / scale_ratio; | ||
920 | if ((scale_x >= w) || (scale_y >= h)) | ||
921 | { | ||
922 | p = buffer_end; | ||
923 | } | ||
924 | if (!right_way_up) | ||
925 | pix = surface + scale_x + ((h - 1 - scale_y) * w); | ||
926 | else | ||
927 | pix = surface + scale_x + (scale_y * w); | ||
928 | p += 4; | ||
929 | break; | ||
930 | default: | ||
931 | count = p[1]; | ||
932 | if (((p + count) > buffer_end) || | ||
933 | ((x + count) > w)) | ||
934 | { | ||
935 | p = buffer_end; | ||
936 | break; | ||
937 | } | ||
938 | p += 2; | ||
939 | done = count; | ||
940 | count /= 2; | ||
941 | while (count > 0) | ||
942 | { | ||
943 | if (((x % scale_ratio) == 0) && (scale_x < w)) | ||
944 | { | ||
945 | *pix = pal[*p >> 4]; | ||
946 | pix++; | ||
947 | scale_x++; | ||
948 | } | ||
949 | x++; | ||
950 | if (((x % scale_ratio) == 0) && (scale_x < w)) | ||
951 | { | ||
952 | *pix = pal[*p & 0xf]; | ||
953 | pix++; | ||
954 | scale_x++; | ||
955 | } | ||
956 | x++; | ||
957 | |||
958 | p++; | ||
959 | count--; | ||
960 | } | ||
961 | |||
962 | if (done & 0x1) | ||
963 | { | ||
964 | if (((x % scale_ratio) == 0) && (scale_x < w)) | ||
965 | { | ||
966 | *pix = pal[*p >> 4]; | ||
967 | scale_x++; | ||
968 | } | ||
969 | x++; | ||
970 | p++; | ||
971 | } | ||
972 | if ((done & 0x3) == 0x1) | ||
973 | p += 2; | ||
974 | else if ((done & 0x3) == 0x2) | ||
975 | p += 1; | ||
976 | break; | ||
977 | } | ||
978 | } | ||
979 | } | ||
980 | } | ||
981 | else | ||
982 | goto close_file; | ||
983 | } | ||
984 | else if (bit_count == 8) | ||
985 | { | ||
986 | if (comp == 0) // no compression | ||
987 | { | ||
988 | pix = surface; | ||
989 | for (y = 0; y < h; y++) | ||
990 | { | ||
991 | if (!right_way_up) pix = surface + ((h - 1 - y) * w); | ||
992 | for (x = 0; x < w; x++) | ||
993 | { | ||
994 | *pix = pal[*p]; | ||
995 | p += scale_ratio; | ||
996 | if (p >= buffer_end) break; | ||
997 | pix++; | ||
998 | } | ||
999 | if (scale_ratio > 1) | ||
1000 | { | ||
1001 | read_line += scale_ratio; | ||
1002 | if (read_line >= image_h) break; | ||
1003 | |||
1004 | position += row_size * (scale_ratio - 1); | ||
1005 | if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; | ||
1006 | p = buffer; | ||
1007 | buffer_end = buffer + row_size; | ||
1008 | } | ||
1009 | else | ||
1010 | { | ||
1011 | fix = (int)(((unsigned long)p) & 0x3); | ||
1012 | if (fix > 0) p += 4 - fix; // align row read | ||
1013 | if (p >= buffer_end) break; | ||
1014 | } | ||
1015 | } | ||
1016 | } | ||
1017 | else if (comp == 1) // rle 8bit/pixel | ||
1018 | { | ||
1019 | int count = 0, done = 0; | ||
1020 | int scale_x = 0, scale_y = 0; | ||
1021 | Eina_Bool scale_down_line = EINA_TRUE; | ||
1022 | |||
1023 | pix = surface; | ||
1024 | if (!right_way_up) pix = surface + ((h - 1 - y) * w); | ||
1025 | |||
1026 | while (p < buffer_end) | ||
1027 | { | ||
1028 | if (p[0]) | ||
1029 | { | ||
1030 | if (scale_down_line) | ||
1031 | { | ||
1032 | if ((x + p[0]) <= image_w) | ||
1033 | { | ||
1034 | unsigned int col = pal[p[1]]; | ||
1035 | |||
1036 | count = p[0]; | ||
1037 | while (count > 0) | ||
1038 | { | ||
1039 | if (((x % scale_ratio) == 0) && (scale_x < w)) | ||
1040 | { | ||
1041 | *pix = col; | ||
1042 | pix++; | ||
1043 | scale_x ++; | ||
1044 | } | ||
1045 | x++; | ||
1046 | count--; | ||
1047 | } | ||
1048 | } | ||
1049 | } | ||
1050 | p += 2; | ||
1051 | } | ||
1052 | else | ||
1053 | { | ||
1054 | switch (p[1]) | ||
1055 | { | ||
1056 | case 0: // EOL | ||
1057 | x = 0; | ||
1058 | scale_x = 0; | ||
1059 | y++; | ||
1060 | if ((y % scale_ratio) == 0) | ||
1061 | { | ||
1062 | scale_y++; | ||
1063 | scale_down_line = EINA_TRUE; | ||
1064 | if (!right_way_up) | ||
1065 | pix = surface + ((h - 1 - scale_y) * w); | ||
1066 | else | ||
1067 | pix = surface + (scale_y * w); | ||
1068 | } | ||
1069 | else | ||
1070 | scale_down_line = EINA_FALSE; | ||
1071 | |||
1072 | if (scale_y >= h) | ||
1073 | { | ||
1074 | p = buffer_end; | ||
1075 | } | ||
1076 | p += 2; | ||
1077 | break; | ||
1078 | case 1: // EOB | ||
1079 | p = buffer_end; | ||
1080 | break; | ||
1081 | case 2: // DELTA | ||
1082 | x += p[2]; | ||
1083 | y += p[3]; | ||
1084 | scale_x = x / scale_ratio; | ||
1085 | scale_y = y / scale_ratio; | ||
1086 | if ((scale_x >= w) || (scale_y >= h)) | ||
1087 | { | ||
1088 | p = buffer_end; | ||
1089 | } | ||
1090 | if (!right_way_up) | ||
1091 | pix = surface + scale_x + ((h - 1 - scale_y) * w); | ||
1092 | else | ||
1093 | pix = surface + scale_x + (scale_y * w); | ||
1094 | p += 4; | ||
1095 | break; | ||
1096 | default: | ||
1097 | count = p[1]; | ||
1098 | if (((p + count) > buffer_end) || | ||
1099 | ((x + count) > image_w)) | ||
1100 | { | ||
1101 | p = buffer_end; | ||
1102 | break; | ||
1103 | } | ||
1104 | p += 2; | ||
1105 | done = count; | ||
1106 | while (count > 0) | ||
1107 | { | ||
1108 | if (((x % scale_ratio) == 0) && (scale_x < w)) | ||
1109 | { | ||
1110 | *pix = pal[*p]; | ||
1111 | pix++; | ||
1112 | scale_x ++; | ||
1113 | } | ||
1114 | p++; | ||
1115 | x++; | ||
1116 | count--; | ||
1117 | } | ||
1118 | if (done & 0x1) p++; | ||
1119 | break; | ||
1120 | } | ||
1121 | } | ||
1122 | } | ||
1123 | } | ||
1124 | else | ||
1125 | goto close_file; | ||
1126 | } | ||
1127 | } | ||
1128 | else if ((bit_count == 16) || (bit_count == 24) || (bit_count == 32)) | ||
1129 | { | ||
1130 | if (comp == 0) // no compression | ||
1131 | { | ||
1132 | position = offset; | ||
1133 | if (scale_ratio == 1) | ||
1134 | buffer = malloc(image_size + 8); // add 8 for padding to avoid checks | ||
1135 | else | ||
1136 | buffer = malloc(row_size); // scale down is usually set because of memory issue, so read line by line | ||
1137 | if (!buffer) | ||
1138 | { | ||
1139 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
1140 | goto close_file; | ||
1141 | } | ||
1142 | if (scale_ratio == 1) | ||
1143 | buffer_end = buffer + image_size; | ||
1144 | else | ||
1145 | buffer_end = buffer + row_size; | ||
1146 | |||
1147 | p = buffer; | ||
1148 | if (scale_ratio == 1) | ||
1149 | { | ||
1150 | if (!read_mem(map, fsize, &position, buffer, image_size)) goto close_file; | ||
1151 | } | ||
1152 | else | ||
1153 | { | ||
1154 | if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; | ||
1155 | } | ||
1156 | if (bit_count == 16) | ||
1157 | { | ||
1158 | unsigned short tmp; | ||
1159 | |||
1160 | pix = surface; | ||
1161 | for (y = 0; y < h; y++) | ||
1162 | { | ||
1163 | if (!right_way_up) pix = surface + ((h - 1 - y) * w); | ||
1164 | for (x = 0; x < w; x++) | ||
1165 | { | ||
1166 | tmp = *((unsigned short *)(p)); | ||
1167 | |||
1168 | r = (tmp >> 7) & 0xf8; r |= r >> 5; | ||
1169 | g = (tmp >> 2) & 0xf8; g |= g >> 5; | ||
1170 | b = (tmp << 3) & 0xf8; b |= b >> 5; | ||
1171 | *pix = ARGB_JOIN(0xff, r, g, b); | ||
1172 | |||
1173 | p += 2 * scale_ratio; | ||
1174 | |||
1175 | if (p >= buffer_end) break; | ||
1176 | pix++; | ||
1177 | } | ||
1178 | if (scale_ratio > 1) | ||
1179 | { | ||
1180 | read_line += scale_ratio; | ||
1181 | if (read_line >= image_h) break; | ||
1182 | |||
1183 | position += row_size * (scale_ratio - 1); | ||
1184 | if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; | ||
1185 | p = buffer; | ||
1186 | buffer_end = buffer + row_size; | ||
1187 | } | ||
1188 | else | ||
1189 | { | ||
1190 | fix = (int)(((unsigned long)p) & 0x3); | ||
1191 | if (fix > 0) p += 4 - fix; // align row read | ||
1192 | if (p >= buffer_end) break; | ||
1193 | } | ||
1194 | } | ||
1195 | } | ||
1196 | else if (bit_count == 24) | ||
1197 | { | ||
1198 | pix = surface; | ||
1199 | for (y = 0; y < h; y++) | ||
1200 | { | ||
1201 | if (!right_way_up) pix = surface + ((h - 1 - y) * w); | ||
1202 | for (x = 0; x < w; x++) | ||
1203 | { | ||
1204 | b = p[0]; | ||
1205 | g = p[1]; | ||
1206 | r = p[2]; | ||
1207 | *pix = ARGB_JOIN(0xff, r, g, b); | ||
1208 | p += 3 * scale_ratio; | ||
1209 | if (p >= buffer_end) break; | ||
1210 | pix++; | ||
1211 | } | ||
1212 | if (scale_ratio > 1) | ||
1213 | { | ||
1214 | read_line += scale_ratio; | ||
1215 | if (read_line >= image_h) break; | ||
1216 | |||
1217 | position += row_size * (scale_ratio - 1); | ||
1218 | if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; | ||
1219 | p = buffer; | ||
1220 | buffer_end = buffer + row_size; | ||
1221 | } | ||
1222 | else | ||
1223 | { | ||
1224 | fix = (int)(((unsigned long)p) & 0x3); | ||
1225 | if (fix > 0) p += 4 - fix; // align row read | ||
1226 | if (p >= buffer_end) break; | ||
1227 | } | ||
1228 | } | ||
1229 | } | ||
1230 | else if (bit_count == 32) | ||
1231 | { | ||
1232 | int none_zero_alpha = 0; | ||
1233 | pix = surface; | ||
1234 | for (y = 0; y < h; y++) | ||
1235 | { | ||
1236 | if (!right_way_up) pix = surface + ((h - 1 - y) * w); | ||
1237 | for (x = 0; x < w; x++) | ||
1238 | { | ||
1239 | b = p[0]; | ||
1240 | g = p[1]; | ||
1241 | r = p[2]; | ||
1242 | a = p[3]; | ||
1243 | if (a) none_zero_alpha = 1; | ||
1244 | if (!hasa) a = 0xff; | ||
1245 | *pix = ARGB_JOIN(a, r, g, b); | ||
1246 | p += 4 * scale_ratio; | ||
1247 | |||
1248 | if (p >= buffer_end) break; | ||
1249 | pix++; | ||
1250 | } | ||
1251 | if (scale_ratio > 1) | ||
1252 | { | ||
1253 | read_line += scale_ratio; | ||
1254 | if (read_line >= image_h) break; | ||
1255 | |||
1256 | position += row_size * (scale_ratio - 1); | ||
1257 | if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; | ||
1258 | p = buffer; | ||
1259 | buffer_end = buffer + row_size; | ||
1260 | } | ||
1261 | else | ||
1262 | { | ||
1263 | fix = (int)(((unsigned long)p) & 0x3); | ||
1264 | if (fix > 0) p += 4 - fix; // align row read | ||
1265 | if (p >= buffer_end) break; | ||
1266 | } | ||
1267 | } | ||
1268 | if (!none_zero_alpha) | ||
1269 | { | ||
1270 | ie->flags.alpha = 0; | ||
1271 | if (hasa) | ||
1272 | { | ||
1273 | unsigned int *pixend = surface + (w * h); | ||
1274 | |||
1275 | for (pix = surface; pix < pixend; pix++) | ||
1276 | A_VAL(pix) = 0xff; | ||
1277 | } | ||
1278 | } | ||
1279 | } | ||
1280 | else | ||
1281 | goto close_file; | ||
1282 | } | ||
1283 | else if (comp == 3) // bit field | ||
1284 | { | ||
1285 | if (!read_uint(map, fsize, &position, &rmask)) goto close_file; | ||
1286 | if (!read_uint(map, fsize, &position, &gmask)) goto close_file; | ||
1287 | if (!read_uint(map, fsize, &position, &bmask)) goto close_file; | ||
1288 | |||
1289 | position = offset; | ||
1290 | if (scale_ratio == 1) | ||
1291 | buffer = malloc(image_size + 8); // add 8 for padding to avoid checks | ||
1292 | else | ||
1293 | buffer = malloc(row_size); // scale down is usually set because of memory issue, so read line by line | ||
1294 | |||
1295 | if (!buffer) | ||
1296 | { | ||
1297 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
1298 | goto close_file; | ||
1299 | } | ||
1300 | if (scale_ratio == 1) | ||
1301 | buffer_end = buffer + image_size; | ||
1302 | else | ||
1303 | buffer_end = buffer + row_size; | ||
1304 | |||
1305 | p = buffer; | ||
1306 | if (scale_ratio == 1) | ||
1307 | { | ||
1308 | if (!read_mem(map, fsize, &position, buffer, image_size)) goto close_file; | ||
1309 | } | ||
1310 | else | ||
1311 | { | ||
1312 | if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; | ||
1313 | } | ||
1314 | |||
1315 | if ((bit_count == 16) && | ||
1316 | (rmask == 0xf800) && (gmask == 0x07e0) && (bmask == 0x001f) | ||
1317 | ) | ||
1318 | { | ||
1319 | unsigned short tmp; | ||
1320 | |||
1321 | pix = surface; | ||
1322 | for (y = 0; y < h; y++) | ||
1323 | { | ||
1324 | if (!right_way_up) pix = surface + ((h - 1 - y) * w); | ||
1325 | for (x = 0; x < w; x++) | ||
1326 | { | ||
1327 | tmp = *((unsigned short *)(p)); | ||
1328 | |||
1329 | r = (tmp >> 8) & 0xf8; r |= r >> 5; | ||
1330 | g = (tmp >> 3) & 0xfc; g |= g >> 6; | ||
1331 | b = (tmp << 3) & 0xf8; b |= b >> 5; | ||
1332 | *pix = ARGB_JOIN(0xff, r, g, b); | ||
1333 | |||
1334 | p += 2 * scale_ratio; | ||
1335 | |||
1336 | if (p >= buffer_end) break; | ||
1337 | pix++; | ||
1338 | } | ||
1339 | if (scale_ratio > 1) | ||
1340 | { | ||
1341 | read_line += scale_ratio; | ||
1342 | if (read_line >= image_h) break; | ||
1343 | |||
1344 | position += row_size * (scale_ratio - 1); | ||
1345 | if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; | ||
1346 | p = buffer; | ||
1347 | buffer_end = buffer + row_size; | ||
1348 | } | ||
1349 | else | ||
1350 | { | ||
1351 | fix = (int)(((unsigned long)p) & 0x3); | ||
1352 | if (fix > 0) p += 4 - fix; // align row read | ||
1353 | if (p >= buffer_end) break; | ||
1354 | } | ||
1355 | } | ||
1356 | } | ||
1357 | else if ((bit_count == 16) && | ||
1358 | (rmask == 0x7c00) && (gmask == 0x03e0) && (bmask == 0x001f) | ||
1359 | ) | ||
1360 | { | ||
1361 | unsigned short tmp; | ||
1362 | pix = surface; | ||
1363 | for (y = 0; y < h; y++) | ||
1364 | { | ||
1365 | if (!right_way_up) pix = surface + ((h - 1 - y) * w); | ||
1366 | for (x = 0; x < w; x++) | ||
1367 | { | ||
1368 | tmp = *((unsigned short *)(p)); | ||
1369 | |||
1370 | r = (tmp >> 7) & 0xf8; r |= r >> 5; | ||
1371 | g = (tmp >> 2) & 0xf8; g |= g >> 5; | ||
1372 | b = (tmp << 3) & 0xf8; b |= b >> 5; | ||
1373 | *pix = ARGB_JOIN(0xff, r, g, b); | ||
1374 | p += 2 * scale_ratio; | ||
1375 | |||
1376 | if (p >= buffer_end) break; | ||
1377 | pix++; | ||
1378 | } | ||
1379 | if (scale_ratio > 1) | ||
1380 | { | ||
1381 | read_line += scale_ratio; | ||
1382 | if (read_line >= image_h) break; | ||
1383 | |||
1384 | position += row_size * (scale_ratio - 1); | ||
1385 | if (!read_mem(map, fsize, &position, buffer_end, row_size)) goto close_file; | ||
1386 | p = buffer; | ||
1387 | buffer_end = buffer + row_size; | ||
1388 | } | ||
1389 | else | ||
1390 | { | ||
1391 | fix = (int)(((unsigned long)p) & 0x3); | ||
1392 | if (fix > 0) p += 4 - fix; // align row read | ||
1393 | if (p >= buffer_end) break; | ||
1394 | } | ||
1395 | } | ||
1396 | } | ||
1397 | else if (bit_count == 32) | ||
1398 | { | ||
1399 | pix = surface; | ||
1400 | for (y = 0; y < h; y++) | ||
1401 | { | ||
1402 | if (!right_way_up) pix = surface + ((h - 1 - y) * w); | ||
1403 | for (x = 0; x < w; x++) | ||
1404 | { | ||
1405 | b = p[0]; | ||
1406 | g = p[1]; | ||
1407 | r = p[2]; | ||
1408 | a = p[3]; | ||
1409 | if (!hasa) a = 0xff; | ||
1410 | *pix = ARGB_JOIN(a, r, g, b); | ||
1411 | |||
1412 | p += 4 * scale_ratio; | ||
1413 | |||
1414 | if (p >= buffer_end) break; | ||
1415 | pix++; | ||
1416 | } | ||
1417 | if (scale_ratio > 1) | ||
1418 | { | ||
1419 | read_line += scale_ratio; | ||
1420 | if (read_line >= image_h) break; | ||
1421 | |||
1422 | position += row_size * (scale_ratio - 1); | ||
1423 | if (!read_mem(map, fsize, &position, buffer, row_size)) goto close_file; | ||
1424 | p = buffer; | ||
1425 | buffer_end = buffer + row_size; | ||
1426 | } | ||
1427 | else | ||
1428 | { | ||
1429 | fix = (int)(((unsigned long)p) & 0x3); | ||
1430 | if (fix > 0) p += 4 - fix; // align row read | ||
1431 | if (p >= buffer_end) break; | ||
1432 | } | ||
1433 | } | ||
1434 | } | ||
1435 | else | ||
1436 | goto close_file; | ||
1437 | } | ||
1438 | else if (comp == 4) // jpeg - only printer drivers | ||
1439 | { | ||
1440 | goto close_file; | ||
1441 | } | ||
1442 | else if (comp == 3) // png - only printer drivers | ||
1443 | { | ||
1444 | goto close_file; | ||
1445 | } | ||
1446 | else | ||
1447 | goto close_file; | ||
1448 | } | ||
1449 | else | ||
1450 | goto close_file; | ||
1451 | |||
1452 | if (buffer) free(buffer); | ||
1453 | if (scale_surface) free(scale_surface); | ||
1454 | |||
1455 | eina_file_map_free(f, map); | ||
1456 | eina_file_close(f); | ||
1457 | |||
1458 | evas_common_image_premul(ie); | ||
1459 | *error = EVAS_LOAD_ERROR_NONE; | ||
1460 | return EINA_TRUE; | ||
1461 | |||
1462 | close_file: | ||
1463 | if (buffer) free(buffer); | ||
1464 | if (scale_surface) free(scale_surface); | ||
1465 | if (map) eina_file_map_free(f, map); | ||
1466 | eina_file_close(f); | ||
1467 | return EINA_FALSE; | ||
1468 | } | ||
1469 | |||
1470 | static int | ||
1471 | module_open(Evas_Module *em) | ||
1472 | { | ||
1473 | if (!em) return 0; | ||
1474 | em->functions = (void *)(&evas_image_load_bmp_func); | ||
1475 | return 1; | ||
1476 | } | ||
1477 | |||
1478 | static void | ||
1479 | module_close(Evas_Module *em __UNUSED__) | ||
1480 | { | ||
1481 | } | ||
1482 | |||
1483 | static Evas_Module_Api evas_modapi = | ||
1484 | { | ||
1485 | EVAS_MODULE_API_VERSION, | ||
1486 | "bmp", | ||
1487 | "none", | ||
1488 | { | ||
1489 | module_open, | ||
1490 | module_close | ||
1491 | } | ||
1492 | }; | ||
1493 | |||
1494 | EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, bmp); | ||
1495 | |||
1496 | #ifndef EVAS_STATIC_BUILD_BMP | ||
1497 | EVAS_EINA_MODULE_DEFINE(image_loader, bmp); | ||
1498 | #endif | ||