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