diff options
Diffstat (limited to 'libraries/evas/src/modules/loaders/gif')
-rw-r--r-- | libraries/evas/src/modules/loaders/gif/Makefile.am | 33 | ||||
-rw-r--r-- | libraries/evas/src/modules/loaders/gif/Makefile.in | 761 | ||||
-rw-r--r-- | libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c | 1038 |
3 files changed, 0 insertions, 1832 deletions
diff --git a/libraries/evas/src/modules/loaders/gif/Makefile.am b/libraries/evas/src/modules/loaders/gif/Makefile.am deleted file mode 100644 index 3ae57a0..0000000 --- a/libraries/evas/src/modules/loaders/gif/Makefile.am +++ /dev/null | |||
@@ -1,33 +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 | @evas_image_loader_gif_cflags@ \ | ||
11 | @EINA_CFLAGS@ | ||
12 | |||
13 | if BUILD_LOADER_GIF | ||
14 | if !EVAS_STATIC_BUILD_GIF | ||
15 | |||
16 | pkgdir = $(libdir)/evas/modules/loaders/gif/$(MODULE_ARCH) | ||
17 | pkg_LTLIBRARIES = module.la | ||
18 | |||
19 | module_la_SOURCES = evas_image_load_gif.c | ||
20 | |||
21 | module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_gif_libs@ $(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_gif.la | ||
28 | |||
29 | libevas_loader_gif_la_SOURCES = evas_image_load_gif.c | ||
30 | libevas_loader_gif_la_LIBADD = @evas_image_loader_gif_libs@ | ||
31 | |||
32 | endif | ||
33 | endif | ||
diff --git a/libraries/evas/src/modules/loaders/gif/Makefile.in b/libraries/evas/src/modules/loaders/gif/Makefile.in deleted file mode 100644 index a7fae36..0000000 --- a/libraries/evas/src/modules/loaders/gif/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/gif | ||
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_gif_la_DEPENDENCIES = | ||
83 | am__libevas_loader_gif_la_SOURCES_DIST = evas_image_load_gif.c | ||
84 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_TRUE@am_libevas_loader_gif_la_OBJECTS = evas_image_load_gif.lo | ||
85 | libevas_loader_gif_la_OBJECTS = $(am_libevas_loader_gif_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_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_TRUE@am_libevas_loader_gif_la_rpath = | ||
90 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la | ||
91 | am__module_la_SOURCES_DIST = evas_image_load_gif.c | ||
92 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_gif.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_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@am_module_la_rpath = \ | ||
98 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@ -rpath \ | ||
99 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_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_gif_la_SOURCES) $(module_la_SOURCES) | ||
127 | DIST_SOURCES = $(am__libevas_loader_gif_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 | @evas_image_loader_gif_cflags@ \ | ||
419 | @EINA_CFLAGS@ | ||
420 | |||
421 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@pkgdir = $(libdir)/evas/modules/loaders/gif/$(MODULE_ARCH) | ||
422 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@pkg_LTLIBRARIES = module.la | ||
423 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@module_la_SOURCES = evas_image_load_gif.c | ||
424 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_gif_libs@ $(top_builddir)/src/lib/libevas.la | ||
425 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version | ||
426 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static | ||
427 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_TRUE@noinst_LTLIBRARIES = libevas_loader_gif.la | ||
428 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_TRUE@libevas_loader_gif_la_SOURCES = evas_image_load_gif.c | ||
429 | @BUILD_LOADER_GIF_TRUE@@EVAS_STATIC_BUILD_GIF_TRUE@libevas_loader_gif_la_LIBADD = @evas_image_loader_gif_libs@ | ||
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/gif/Makefile'; \ | ||
444 | $(am__cd) $(top_srcdir) && \ | ||
445 | $(AUTOMAKE) --gnu src/modules/loaders/gif/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_gif.la: $(libevas_loader_gif_la_OBJECTS) $(libevas_loader_gif_la_DEPENDENCIES) | ||
505 | $(AM_V_CCLD)$(LINK) $(am_libevas_loader_gif_la_rpath) $(libevas_loader_gif_la_OBJECTS) $(libevas_loader_gif_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_gif.Plo@am__quote@ | ||
516 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_gif.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_gif.lo: evas_image_load_gif.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_gif.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_gif.Tpo -c -o module_la-evas_image_load_gif.lo `test -f 'evas_image_load_gif.c' || echo '$(srcdir)/'`evas_image_load_gif.c | ||
544 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_gif.Tpo $(DEPDIR)/module_la-evas_image_load_gif.Plo | ||
545 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
546 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_gif.c' object='module_la-evas_image_load_gif.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_gif.lo `test -f 'evas_image_load_gif.c' || echo '$(srcdir)/'`evas_image_load_gif.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/gif/evas_image_load_gif.c b/libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c deleted file mode 100644 index dbb3584..0000000 --- a/libraries/evas/src/modules/loaders/gif/evas_image_load_gif.c +++ /dev/null | |||
@@ -1,1038 +0,0 @@ | |||
1 | #include "evas_common.h" | ||
2 | #include "evas_private.h" | ||
3 | |||
4 | #include <sys/types.h> | ||
5 | #include <sys/stat.h> | ||
6 | #include <fcntl.h> | ||
7 | #include <unistd.h> | ||
8 | |||
9 | #include <gif_lib.h> | ||
10 | |||
11 | typedef struct _Gif_Frame Gif_Frame; | ||
12 | |||
13 | typedef enum _Frame_Load_Type | ||
14 | { | ||
15 | LOAD_FRAME_NONE = 0, | ||
16 | LOAD_FRAME_INFO = 1, | ||
17 | LOAD_FRAME_DATA = 2, | ||
18 | LOAD_FRAME_DATA_INFO = 3 | ||
19 | } Frame_Load_Type; | ||
20 | |||
21 | struct _Gif_Frame | ||
22 | { | ||
23 | struct { | ||
24 | /* Image descriptor */ | ||
25 | int x; | ||
26 | int y; | ||
27 | int w; | ||
28 | int h; | ||
29 | int interlace; | ||
30 | } image_des; | ||
31 | |||
32 | struct { | ||
33 | /* Graphic Control*/ | ||
34 | int disposal; | ||
35 | int transparent; | ||
36 | int delay; | ||
37 | int input; | ||
38 | } frame_info; | ||
39 | }; | ||
40 | |||
41 | static Eina_Bool evas_image_load_file_data_gif_internal(Image_Entry *ie, Image_Entry_Frame *frame, int *error); | ||
42 | |||
43 | static Eina_Bool evas_image_load_file_head_gif(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); | ||
44 | static Eina_Bool evas_image_load_file_data_gif(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); | ||
45 | static double evas_image_load_frame_duration_gif(Image_Entry *ie, const char *file, int start_frame, int frame_num) ; | ||
46 | static Eina_Bool evas_image_load_specific_frame(Image_Entry *ie, const char *file, int frame_index, int *error); | ||
47 | |||
48 | static Evas_Image_Load_Func evas_image_load_gif_func = | ||
49 | { | ||
50 | EINA_TRUE, | ||
51 | evas_image_load_file_head_gif, | ||
52 | evas_image_load_file_data_gif, | ||
53 | evas_image_load_frame_duration_gif, | ||
54 | EINA_FALSE | ||
55 | }; | ||
56 | #define byte2_to_int(a,b) (((b)<<8)|(a)) | ||
57 | |||
58 | #define FRAME_MAX 1024 | ||
59 | |||
60 | /* find specific frame in image entry */ | ||
61 | static Eina_Bool | ||
62 | _find_frame(Image_Entry *ie, int frame_index, Image_Entry_Frame **frame) | ||
63 | { | ||
64 | Eina_List *l; | ||
65 | Image_Entry_Frame *hit_frame = NULL; | ||
66 | |||
67 | if (!ie) return EINA_FALSE; | ||
68 | if (!ie->frames) return EINA_FALSE; | ||
69 | |||
70 | EINA_LIST_FOREACH(ie->frames, l, hit_frame) | ||
71 | { | ||
72 | if (hit_frame->index == frame_index) | ||
73 | { | ||
74 | *frame = hit_frame; | ||
75 | return EINA_TRUE; | ||
76 | } | ||
77 | } | ||
78 | return EINA_FALSE; | ||
79 | } | ||
80 | |||
81 | static Eina_Bool | ||
82 | _find_close_frame(Image_Entry *ie, int frame_index, Image_Entry_Frame **frame) | ||
83 | { | ||
84 | int i; | ||
85 | Eina_Bool hit = EINA_FALSE; | ||
86 | i = frame_index -1; | ||
87 | |||
88 | if (!ie) return EINA_FALSE; | ||
89 | if (!ie->frames) return EINA_FALSE; | ||
90 | |||
91 | for (; i > 0; i--) | ||
92 | { | ||
93 | hit = _find_frame(ie, i, frame); | ||
94 | if (hit) | ||
95 | return EINA_TRUE; | ||
96 | } | ||
97 | return EINA_FALSE; | ||
98 | } | ||
99 | |||
100 | static Eina_Bool | ||
101 | _evas_image_skip_frame(GifFileType *gif, int frame) | ||
102 | { | ||
103 | int remain_frame = 0; | ||
104 | GifRecordType rec; | ||
105 | |||
106 | if (!gif) return EINA_FALSE; | ||
107 | if (frame == 0) return EINA_TRUE; /* no need to skip */ | ||
108 | if (frame < 0 || frame > FRAME_MAX) return EINA_FALSE; | ||
109 | |||
110 | remain_frame = frame; | ||
111 | |||
112 | do | ||
113 | { | ||
114 | if (DGifGetRecordType(gif, &rec) == GIF_ERROR) return EINA_FALSE; | ||
115 | |||
116 | if (rec == EXTENSION_RECORD_TYPE) | ||
117 | { | ||
118 | int ext_code; | ||
119 | GifByteType *ext; | ||
120 | |||
121 | ext = NULL; | ||
122 | DGifGetExtension(gif, &ext_code, &ext); | ||
123 | while (ext) | ||
124 | { /*skip extention */ | ||
125 | ext = NULL; | ||
126 | DGifGetExtensionNext(gif, &ext); | ||
127 | } | ||
128 | } | ||
129 | |||
130 | if (rec == IMAGE_DESC_RECORD_TYPE) | ||
131 | { | ||
132 | int img_code; | ||
133 | GifByteType *img; | ||
134 | |||
135 | if (DGifGetImageDesc(gif) == GIF_ERROR) return EINA_FALSE; | ||
136 | |||
137 | remain_frame --; | ||
138 | /* we have to count frame, so use DGifGetCode and skip decoding */ | ||
139 | if (DGifGetCode(gif, &img_code, &img) == GIF_ERROR) return EINA_FALSE; | ||
140 | |||
141 | while (img) | ||
142 | { | ||
143 | img = NULL; | ||
144 | DGifGetCodeNext(gif, &img); | ||
145 | } | ||
146 | if (remain_frame < 1) return EINA_TRUE; | ||
147 | } | ||
148 | if (rec == TERMINATE_RECORD_TYPE) return EINA_FALSE; /* end of file */ | ||
149 | |||
150 | } while ((rec != TERMINATE_RECORD_TYPE) && (remain_frame > 0)); | ||
151 | return EINA_FALSE; | ||
152 | } | ||
153 | |||
154 | static Eina_Bool | ||
155 | _evas_image_load_frame_graphic_info(Image_Entry_Frame *frame, GifByteType *ext) | ||
156 | { | ||
157 | Gif_Frame *gif_frame = NULL; | ||
158 | if ((!frame) || (!ext)) return EINA_FALSE; | ||
159 | |||
160 | gif_frame = (Gif_Frame *) frame->info; | ||
161 | |||
162 | /* transparent */ | ||
163 | if ((ext[1] & 0x1) != 0) | ||
164 | gif_frame->frame_info.transparent = ext[4]; | ||
165 | else | ||
166 | gif_frame->frame_info.transparent = -1; | ||
167 | |||
168 | gif_frame->frame_info.input = (ext[1] >>1) & 0x1; | ||
169 | gif_frame->frame_info.disposal = (ext[1] >>2) & 0x7; | ||
170 | gif_frame->frame_info.delay = byte2_to_int(ext[2], ext[3]); | ||
171 | return EINA_TRUE; | ||
172 | } | ||
173 | |||
174 | static Eina_Bool | ||
175 | _evas_image_load_frame_image_des_info(GifFileType *gif, Image_Entry_Frame *frame) | ||
176 | { | ||
177 | Gif_Frame *gif_frame = NULL; | ||
178 | if ((!gif) || (!frame)) return EINA_FALSE; | ||
179 | |||
180 | gif_frame = (Gif_Frame *) frame->info; | ||
181 | gif_frame->image_des.x = gif->Image.Left; | ||
182 | gif_frame->image_des.y = gif->Image.Top; | ||
183 | gif_frame->image_des.w = gif->Image.Width; | ||
184 | gif_frame->image_des.h = gif->Image.Height; | ||
185 | gif_frame->image_des.interlace = gif->Image.Interlace; | ||
186 | return EINA_TRUE; | ||
187 | } | ||
188 | |||
189 | static Eina_Bool | ||
190 | _evas_image_load_frame_image_data(Image_Entry *ie, GifFileType *gif, Image_Entry_Frame *frame, int *error) | ||
191 | { | ||
192 | int w; | ||
193 | int h; | ||
194 | int x; | ||
195 | int y; | ||
196 | int i,j; | ||
197 | int bg; | ||
198 | int r; | ||
199 | int g; | ||
200 | int b; | ||
201 | int alpha; | ||
202 | double per; | ||
203 | double per_inc; | ||
204 | ColorMapObject *cmap; | ||
205 | GifRowType *rows; | ||
206 | int intoffset[] = { 0, 4, 2, 1 }; | ||
207 | int intjump[] = { 8, 8, 4, 2 }; | ||
208 | size_t siz; | ||
209 | int cache_w; | ||
210 | int cache_h; | ||
211 | int cur_h; | ||
212 | int cur_w; | ||
213 | int disposal = 0; | ||
214 | int bg_val = 0; | ||
215 | DATA32 *ptr; | ||
216 | Gif_Frame *gif_frame = NULL; | ||
217 | |||
218 | if ((!gif) || (!frame)) return EINA_FALSE; | ||
219 | |||
220 | gif_frame = (Gif_Frame *) frame->info; | ||
221 | w = gif->Image.Width; | ||
222 | h = gif->Image.Height; | ||
223 | x = gif->Image.Left; | ||
224 | y = gif->Image.Top; | ||
225 | cache_w = ie->w; | ||
226 | cache_h = ie->h; | ||
227 | |||
228 | rows = malloc(h * sizeof(GifRowType *)); | ||
229 | if (!rows) | ||
230 | { | ||
231 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
232 | return EINA_FALSE; | ||
233 | } | ||
234 | for (i = 0; i < h; i++) | ||
235 | { | ||
236 | rows[i] = NULL; | ||
237 | } | ||
238 | for (i = 0; i < h; i++) | ||
239 | { | ||
240 | rows[i] = malloc(w * sizeof(GifPixelType)); | ||
241 | if (!rows[i]) | ||
242 | { | ||
243 | for (i = 0; i < h; i++) | ||
244 | { | ||
245 | if (rows[i]) | ||
246 | { | ||
247 | free(rows[i]); | ||
248 | } | ||
249 | } | ||
250 | free(rows); | ||
251 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
252 | return EINA_FALSE; | ||
253 | } | ||
254 | } | ||
255 | if (gif->Image.Interlace) | ||
256 | { | ||
257 | for (i = 0; i < 4; i++) | ||
258 | { | ||
259 | for (j = intoffset[i]; j < h; j += intjump[i]) | ||
260 | { | ||
261 | DGifGetLine(gif, rows[j], w); | ||
262 | } | ||
263 | } | ||
264 | } | ||
265 | else | ||
266 | { | ||
267 | for (i = 0; i < h; i++) | ||
268 | { | ||
269 | if (DGifGetLine(gif, rows[i], w) != GIF_OK) | ||
270 | { | ||
271 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
272 | goto error; | ||
273 | } | ||
274 | } | ||
275 | } | ||
276 | alpha = gif_frame->frame_info.transparent; | ||
277 | siz = cache_w *cache_h * sizeof(DATA32); | ||
278 | frame->data = malloc(siz); | ||
279 | if (!frame->data) | ||
280 | { | ||
281 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
282 | goto error; | ||
283 | } | ||
284 | ptr = frame->data; | ||
285 | bg = gif->SBackGroundColor; | ||
286 | cmap = (gif->Image.ColorMap ? gif->Image.ColorMap : gif->SColorMap); | ||
287 | |||
288 | if (!cmap) | ||
289 | { | ||
290 | DGifCloseFile(gif); | ||
291 | for (i = 0; i < h; i++) | ||
292 | { | ||
293 | free(rows[i]); | ||
294 | } | ||
295 | free(rows); | ||
296 | if (frame->data) free(frame->data); | ||
297 | *error = EVAS_LOAD_ERROR_CORRUPT_FILE; | ||
298 | return EINA_FALSE; | ||
299 | } | ||
300 | |||
301 | /* get the background value */ | ||
302 | r = cmap->Colors[bg].Red; | ||
303 | g = cmap->Colors[bg].Green; | ||
304 | b = cmap->Colors[bg].Blue; | ||
305 | bg_val = ARGB_JOIN(0xff, r, g, b); | ||
306 | |||
307 | per_inc = 100.0 / (((double)w) * h); | ||
308 | cur_h = h; | ||
309 | cur_w = w; | ||
310 | if (cur_h > cache_h) cur_h = cache_h; | ||
311 | if (cur_w > cache_w) cur_w = cache_w; | ||
312 | |||
313 | if (frame->index > 1) | ||
314 | { | ||
315 | /* get previous frame only frame index is bigger than 1 */ | ||
316 | DATA32 *ptr_src; | ||
317 | Image_Entry_Frame *new_frame = NULL; | ||
318 | int cur_frame = frame->index; | ||
319 | int start_frame = 1; | ||
320 | int j = 0; | ||
321 | |||
322 | if (_find_close_frame(ie, cur_frame, &new_frame)) | ||
323 | start_frame = new_frame->index + 1; | ||
324 | |||
325 | if ((start_frame < 1) || (start_frame > cur_frame)) | ||
326 | { | ||
327 | *error = EVAS_LOAD_ERROR_CORRUPT_FILE; | ||
328 | goto error; | ||
329 | } | ||
330 | /* load previous frame of cur_frame */ | ||
331 | for (j = start_frame; j < cur_frame ; j++) | ||
332 | { | ||
333 | if (!evas_image_load_specific_frame(ie, ie->file, j, error)) | ||
334 | { | ||
335 | *error = EVAS_LOAD_ERROR_CORRUPT_FILE; | ||
336 | goto error; | ||
337 | } | ||
338 | } | ||
339 | if (!_find_frame(ie, cur_frame - 1, &new_frame)) | ||
340 | { | ||
341 | *error = EVAS_LOAD_ERROR_CORRUPT_FILE; | ||
342 | goto error; | ||
343 | } | ||
344 | else | ||
345 | { | ||
346 | Gif_Frame *gif_frame = NULL; | ||
347 | ptr_src = new_frame->data; | ||
348 | if (new_frame->info) | ||
349 | { | ||
350 | gif_frame = (Gif_Frame *)(new_frame->info); | ||
351 | disposal = gif_frame->frame_info.disposal; | ||
352 | } | ||
353 | switch(disposal) /* we only support disposal flag 0,1,2 */ | ||
354 | { | ||
355 | case 1: /* Do not dispose. need previous frame*/ | ||
356 | memcpy(ptr, ptr_src, siz); | ||
357 | /* composite frames */ | ||
358 | ptr = ptr + cache_w * y; | ||
359 | |||
360 | for (i = 0; i < cur_h; i++) | ||
361 | { | ||
362 | ptr = ptr + x; | ||
363 | for (j = 0; j < cur_w; j++) | ||
364 | { | ||
365 | if (rows[i][j] == alpha) | ||
366 | { | ||
367 | ptr++ ; | ||
368 | } | ||
369 | else | ||
370 | { | ||
371 | r = cmap->Colors[rows[i][j]].Red; | ||
372 | g = cmap->Colors[rows[i][j]].Green; | ||
373 | b = cmap->Colors[rows[i][j]].Blue; | ||
374 | *ptr++ = ARGB_JOIN(0xff, r, g, b); | ||
375 | } | ||
376 | per += per_inc; | ||
377 | } | ||
378 | ptr = ptr + (cache_w - (x + cur_w)); | ||
379 | } | ||
380 | break; | ||
381 | case 2: /* Restore to background color */ | ||
382 | memcpy(ptr, ptr_src, siz); | ||
383 | /* composite frames */ | ||
384 | for (i = 0; i < cache_h; i++) | ||
385 | { | ||
386 | if ((i < y) || (i >= (y + cur_h))) | ||
387 | { | ||
388 | for (j = 0; j < cache_w; j++) | ||
389 | { | ||
390 | *ptr = bg_val; | ||
391 | ptr++; | ||
392 | } | ||
393 | } | ||
394 | else | ||
395 | { | ||
396 | int i1, j1; | ||
397 | i1 = i -y; | ||
398 | |||
399 | for (j = 0; j < cache_w; j++) | ||
400 | { | ||
401 | j1 = j - x; | ||
402 | if ((j < x) || (j >= (x + cur_w))) | ||
403 | { | ||
404 | *ptr = bg_val; | ||
405 | ptr++; | ||
406 | } | ||
407 | else | ||
408 | { | ||
409 | r = cmap->Colors[rows[i1][j1]].Red; | ||
410 | g = cmap->Colors[rows[i1][j1]].Green; | ||
411 | b = cmap->Colors[rows[i1][j1]].Blue; | ||
412 | *ptr++ = ARGB_JOIN(0xff, r, g, b); | ||
413 | } | ||
414 | } | ||
415 | } | ||
416 | } | ||
417 | break; | ||
418 | case 0: /* No disposal specified */ | ||
419 | default: | ||
420 | memset(ptr, 0, siz); | ||
421 | for (i = 0; i < cache_h; i++) | ||
422 | { | ||
423 | if ((i < y) || (i >= (y + cur_h))) | ||
424 | { | ||
425 | for (j = 0; j < cache_w; j++) | ||
426 | { | ||
427 | *ptr = bg_val; | ||
428 | ptr++; | ||
429 | } | ||
430 | } | ||
431 | else | ||
432 | { | ||
433 | int i1, j1; | ||
434 | i1 = i -y; | ||
435 | |||
436 | for (j = 0; j < cache_w; j++) | ||
437 | { | ||
438 | j1 = j - x; | ||
439 | if ((j < x) || (j >= (x + cur_w))) | ||
440 | { | ||
441 | *ptr = bg_val; | ||
442 | ptr++; | ||
443 | } | ||
444 | else | ||
445 | { | ||
446 | r = cmap->Colors[rows[i1][j1]].Red; | ||
447 | g = cmap->Colors[rows[i1][j1]].Green; | ||
448 | b = cmap->Colors[rows[i1][j1]].Blue; | ||
449 | *ptr++ = ARGB_JOIN(0xff, r, g, b); | ||
450 | } | ||
451 | } | ||
452 | } | ||
453 | } | ||
454 | break; | ||
455 | } | ||
456 | } | ||
457 | } | ||
458 | else /* first frame decoding */ | ||
459 | { | ||
460 | /* fill background color */ | ||
461 | for (i = 0; i < cache_h; i++) | ||
462 | { | ||
463 | if ((i < y) || (i >= (y + cur_h))) | ||
464 | { | ||
465 | for (j = 0; j < cache_w; j++) | ||
466 | { | ||
467 | *ptr = bg_val; | ||
468 | ptr++; | ||
469 | } | ||
470 | } | ||
471 | else | ||
472 | { | ||
473 | int i1, j1; | ||
474 | i1 = i -y; | ||
475 | |||
476 | for (j = 0; j < cache_w; j++) | ||
477 | { | ||
478 | j1 = j - x; | ||
479 | if ((j < x) || (j >= (x + cur_w))) | ||
480 | { | ||
481 | *ptr = bg_val; | ||
482 | ptr++; | ||
483 | } | ||
484 | else | ||
485 | { | ||
486 | if (rows[i1][j1] == alpha) | ||
487 | { | ||
488 | ptr++ ; | ||
489 | } | ||
490 | else | ||
491 | { | ||
492 | r = cmap->Colors[rows[i1][j1]].Red; | ||
493 | g = cmap->Colors[rows[i1][j1]].Green; | ||
494 | b = cmap->Colors[rows[i1][j1]].Blue; | ||
495 | *ptr++ = ARGB_JOIN(0xff, r, g, b); | ||
496 | } | ||
497 | } | ||
498 | } | ||
499 | } | ||
500 | } | ||
501 | } | ||
502 | |||
503 | for (i = 0; i < h; i++) | ||
504 | { | ||
505 | if (rows[i]) free(rows[i]); | ||
506 | } | ||
507 | if (rows) free(rows); | ||
508 | frame->loaded = EINA_TRUE; | ||
509 | return EINA_TRUE; | ||
510 | error: | ||
511 | for (i = 0; i < h; i++) | ||
512 | { | ||
513 | if (rows[i]) free(rows[i]); | ||
514 | } | ||
515 | if (rows) free(rows); | ||
516 | return EINA_FALSE; | ||
517 | } | ||
518 | |||
519 | static Eina_Bool | ||
520 | _evas_image_load_frame(Image_Entry *ie, GifFileType *gif, Image_Entry_Frame *frame, Frame_Load_Type type, int *error) | ||
521 | { | ||
522 | GifRecordType rec; | ||
523 | int gra_res = 0, img_res = 0; | ||
524 | Eina_Bool res = EINA_FALSE; | ||
525 | Gif_Frame *gif_frame = NULL; | ||
526 | |||
527 | if ((!gif) || (!frame)) return EINA_FALSE; | ||
528 | gif_frame = (Gif_Frame *) frame->info; | ||
529 | |||
530 | if (type > LOAD_FRAME_DATA_INFO) return EINA_FALSE; | ||
531 | |||
532 | do | ||
533 | { | ||
534 | if (DGifGetRecordType(gif, &rec) == GIF_ERROR) return EINA_FALSE; | ||
535 | if (rec == IMAGE_DESC_RECORD_TYPE) | ||
536 | { | ||
537 | img_res++; | ||
538 | break; | ||
539 | } | ||
540 | else if (rec == EXTENSION_RECORD_TYPE) | ||
541 | { | ||
542 | int ext_code; | ||
543 | GifByteType *ext; | ||
544 | |||
545 | ext = NULL; | ||
546 | DGifGetExtension(gif, &ext_code, &ext); | ||
547 | while (ext) | ||
548 | { | ||
549 | if (ext_code == 0xf9) /* Graphic Control Extension */ | ||
550 | { | ||
551 | gra_res++; | ||
552 | /* fill frame info */ | ||
553 | if ((type == LOAD_FRAME_INFO) || (type == LOAD_FRAME_DATA_INFO)) | ||
554 | _evas_image_load_frame_graphic_info(frame,ext); | ||
555 | } | ||
556 | ext = NULL; | ||
557 | DGifGetExtensionNext(gif, &ext); | ||
558 | } | ||
559 | } | ||
560 | } while ((rec != TERMINATE_RECORD_TYPE) && (img_res == 0)); | ||
561 | if (img_res != 1) return EINA_FALSE; | ||
562 | if (DGifGetImageDesc(gif) == GIF_ERROR) return EINA_FALSE; | ||
563 | if ((type == LOAD_FRAME_INFO) || (type == LOAD_FRAME_DATA_INFO)) | ||
564 | _evas_image_load_frame_image_des_info(gif, frame); | ||
565 | |||
566 | if ((type == LOAD_FRAME_DATA) || (type == LOAD_FRAME_DATA_INFO)) | ||
567 | { | ||
568 | res = _evas_image_load_frame_image_data(ie, gif,frame, error); | ||
569 | if (!res) return EINA_FALSE; | ||
570 | } | ||
571 | return EINA_TRUE; | ||
572 | } | ||
573 | |||
574 | |||
575 | /* set frame data to cache entry's data */ | ||
576 | static Eina_Bool | ||
577 | evas_image_load_file_data_gif_internal(Image_Entry *ie, Image_Entry_Frame *frame, int *error) | ||
578 | { | ||
579 | int w; | ||
580 | int h; | ||
581 | int dst_x; | ||
582 | int dst_y; | ||
583 | DATA32 *dst; | ||
584 | DATA32 *src; | ||
585 | int cache_w, cache_h; | ||
586 | size_t siz; | ||
587 | Gif_Frame *gif_frame = NULL; | ||
588 | |||
589 | gif_frame = (Gif_Frame *) frame->info; | ||
590 | cache_w = ie->w; | ||
591 | cache_h = ie->h; | ||
592 | w = gif_frame->image_des.w; | ||
593 | h = gif_frame->image_des.h; | ||
594 | dst_x = gif_frame->image_des.x; | ||
595 | dst_y = gif_frame->image_des.y; | ||
596 | |||
597 | src = frame->data; | ||
598 | |||
599 | if (!evas_cache_image_pixels(ie)) | ||
600 | { | ||
601 | evas_cache_image_surface_alloc(ie, cache_w, cache_h); | ||
602 | } | ||
603 | |||
604 | if (!evas_cache_image_pixels(ie)) | ||
605 | { | ||
606 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
607 | return EINA_FALSE; | ||
608 | } | ||
609 | |||
610 | /* only copy real frame part */ | ||
611 | siz = cache_w * cache_h * sizeof(DATA32); | ||
612 | dst = evas_cache_image_pixels(ie); | ||
613 | |||
614 | memcpy(dst, src, siz); | ||
615 | |||
616 | evas_common_image_premul(ie); | ||
617 | |||
618 | *error = EVAS_LOAD_ERROR_NONE; | ||
619 | return EINA_TRUE; | ||
620 | } | ||
621 | |||
622 | static Eina_Bool | ||
623 | evas_image_load_file_head_gif(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) | ||
624 | { | ||
625 | int fd; | ||
626 | GifFileType *gif; | ||
627 | GifRecordType rec; | ||
628 | int w; | ||
629 | int h; | ||
630 | int alpha; | ||
631 | int loop_count = -1; | ||
632 | |||
633 | w = 0; | ||
634 | h = 0; | ||
635 | alpha = -1; | ||
636 | |||
637 | #ifndef __EMX__ | ||
638 | fd = open(file, O_RDONLY); | ||
639 | #else | ||
640 | fd = open(file, O_RDONLY | O_BINARY); | ||
641 | #endif | ||
642 | if (fd < 0) | ||
643 | { | ||
644 | *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; | ||
645 | return EINA_FALSE; | ||
646 | } | ||
647 | |||
648 | gif = DGifOpenFileHandle(fd); | ||
649 | if (!gif) | ||
650 | { | ||
651 | if (fd) close(fd); | ||
652 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
653 | return EINA_FALSE; | ||
654 | } | ||
655 | |||
656 | /* check logical screen size */ | ||
657 | w = gif->SWidth; | ||
658 | h = gif->SHeight; | ||
659 | |||
660 | if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || | ||
661 | IMG_TOO_BIG(w, h)) | ||
662 | { | ||
663 | DGifCloseFile(gif); | ||
664 | if (IMG_TOO_BIG(w, h)) | ||
665 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
666 | else | ||
667 | *error = EVAS_LOAD_ERROR_GENERIC; | ||
668 | return EINA_FALSE; | ||
669 | } | ||
670 | ie->w = w; | ||
671 | ie->h = h; | ||
672 | |||
673 | do | ||
674 | { | ||
675 | if (DGifGetRecordType(gif, &rec) == GIF_ERROR) | ||
676 | { | ||
677 | /* PrintGifError(); */ | ||
678 | DGifCloseFile(gif); | ||
679 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
680 | return EINA_FALSE; | ||
681 | } | ||
682 | |||
683 | /* image descript info */ | ||
684 | if (rec == IMAGE_DESC_RECORD_TYPE) | ||
685 | { | ||
686 | int img_code; | ||
687 | GifByteType *img; | ||
688 | |||
689 | if (DGifGetImageDesc(gif) == GIF_ERROR) | ||
690 | { | ||
691 | /* PrintGifError(); */ | ||
692 | DGifCloseFile(gif); | ||
693 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
694 | return EINA_FALSE; | ||
695 | } | ||
696 | /* we have to count frame, so use DGifGetCode and skip decoding */ | ||
697 | if (DGifGetCode(gif, &img_code, &img) == GIF_ERROR) | ||
698 | { | ||
699 | /* PrintGifError(); */ | ||
700 | DGifCloseFile(gif); | ||
701 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
702 | return EINA_FALSE; | ||
703 | } | ||
704 | while (img) | ||
705 | { | ||
706 | img = NULL; | ||
707 | DGifGetCodeNext(gif, &img); | ||
708 | } | ||
709 | } | ||
710 | else if (rec == EXTENSION_RECORD_TYPE) | ||
711 | { | ||
712 | int ext_code; | ||
713 | GifByteType *ext; | ||
714 | |||
715 | ext = NULL; | ||
716 | DGifGetExtension(gif, &ext_code, &ext); | ||
717 | while (ext) | ||
718 | { | ||
719 | if (ext_code == 0xf9) /* Graphic Control Extension */ | ||
720 | { | ||
721 | if ((ext[1] & 1) && (alpha < 0)) alpha = (int)ext[4]; | ||
722 | } | ||
723 | else if (ext_code == 0xff) /* application extension */ | ||
724 | { | ||
725 | if (!strncmp ((char*)(&ext[1]), "NETSCAPE2.0", 11) || | ||
726 | !strncmp ((char*)(&ext[1]), "ANIMEXTS1.0", 11)) | ||
727 | { | ||
728 | ext=NULL; | ||
729 | DGifGetExtensionNext(gif, &ext); | ||
730 | |||
731 | if (ext[1] == 0x01) | ||
732 | { | ||
733 | loop_count = ext[2] + (ext[3] << 8); | ||
734 | if (loop_count > 0) loop_count++; | ||
735 | } | ||
736 | } | ||
737 | } | ||
738 | |||
739 | ext = NULL; | ||
740 | DGifGetExtensionNext(gif, &ext); | ||
741 | } | ||
742 | } | ||
743 | } while (rec != TERMINATE_RECORD_TYPE); | ||
744 | |||
745 | if (alpha >= 0) ie->flags.alpha = 1; | ||
746 | |||
747 | if (gif->ImageCount > 1) | ||
748 | { | ||
749 | ie->flags.animated = 1; | ||
750 | ie->loop_count = loop_count; | ||
751 | ie->loop_hint = EVAS_IMAGE_ANIMATED_HINT_LOOP; | ||
752 | ie->frame_count = gif->ImageCount; | ||
753 | ie->frames = NULL; | ||
754 | } | ||
755 | |||
756 | DGifCloseFile(gif); | ||
757 | *error = EVAS_LOAD_ERROR_NONE; | ||
758 | return EINA_TRUE; | ||
759 | } | ||
760 | |||
761 | static Eina_Bool | ||
762 | evas_image_load_specific_frame(Image_Entry *ie, const char *file, int frame_index, int *error) | ||
763 | { | ||
764 | int fd; | ||
765 | GifFileType *gif; | ||
766 | Image_Entry_Frame *frame = NULL; | ||
767 | Gif_Frame *gif_frame = NULL; | ||
768 | |||
769 | #ifndef __EMX__ | ||
770 | fd = open(file, O_RDONLY); | ||
771 | #else | ||
772 | fd = open(file, O_RDONLY | O_BINARY); | ||
773 | #endif | ||
774 | if (fd < 0) | ||
775 | { | ||
776 | *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; | ||
777 | return EINA_FALSE; | ||
778 | } | ||
779 | |||
780 | gif = DGifOpenFileHandle(fd); | ||
781 | if (!gif) | ||
782 | { | ||
783 | if (fd) close(fd); | ||
784 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
785 | return EINA_FALSE; | ||
786 | } | ||
787 | if (!_evas_image_skip_frame(gif, frame_index-1)) | ||
788 | { | ||
789 | if (fd) close(fd); | ||
790 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
791 | return EINA_FALSE; | ||
792 | } | ||
793 | |||
794 | frame = malloc(sizeof (Image_Entry_Frame)); | ||
795 | if (!frame) | ||
796 | { | ||
797 | if (fd) close(fd); | ||
798 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
799 | return EINA_FALSE; | ||
800 | } | ||
801 | |||
802 | gif_frame = malloc(sizeof (Gif_Frame)); | ||
803 | if (!gif_frame) | ||
804 | { | ||
805 | if (fd) close(fd); | ||
806 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
807 | return EINA_FALSE; | ||
808 | } | ||
809 | frame->info = gif_frame; | ||
810 | frame->index = frame_index; | ||
811 | if (!_evas_image_load_frame(ie,gif, frame, LOAD_FRAME_DATA_INFO,error)) | ||
812 | { | ||
813 | if (fd) close(fd); | ||
814 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
815 | return EINA_FALSE; | ||
816 | } | ||
817 | |||
818 | ie->frames = eina_list_append(ie->frames, frame); | ||
819 | DGifCloseFile(gif); | ||
820 | return EINA_TRUE; | ||
821 | } | ||
822 | |||
823 | static Eina_Bool | ||
824 | evas_image_load_file_data_gif(Image_Entry *ie, const char *file, const char *key __UNUSED__, int *error) | ||
825 | { | ||
826 | int cur_frame_index; | ||
827 | Image_Entry_Frame *frame = NULL; | ||
828 | Eina_Bool hit; | ||
829 | |||
830 | if(!ie->flags.animated) | ||
831 | cur_frame_index = 1; | ||
832 | else | ||
833 | cur_frame_index = ie->cur_frame; | ||
834 | |||
835 | if ((ie->flags.animated) && | ||
836 | ((cur_frame_index <0) || (cur_frame_index > FRAME_MAX) || (cur_frame_index > ie->frame_count))) | ||
837 | { | ||
838 | *error = EVAS_LOAD_ERROR_GENERIC; | ||
839 | return EINA_FALSE; | ||
840 | } | ||
841 | |||
842 | /* first time frame is set to be 0. so default is 1 */ | ||
843 | if (cur_frame_index == 0) cur_frame_index++; | ||
844 | |||
845 | /* Check current frame exists in hash table */ | ||
846 | hit = _find_frame(ie, cur_frame_index, &frame); | ||
847 | |||
848 | /* if current frame exist in has table, check load flag */ | ||
849 | if (hit) | ||
850 | { | ||
851 | if (frame->loaded) | ||
852 | evas_image_load_file_data_gif_internal(ie,frame,error); | ||
853 | else | ||
854 | { | ||
855 | int fd; | ||
856 | GifFileType *gif; | ||
857 | |||
858 | #ifndef __EMX__ | ||
859 | fd = open(file, O_RDONLY); | ||
860 | #else | ||
861 | fd = open(file, O_RDONLY | O_BINARY); | ||
862 | #endif | ||
863 | if (fd < 0) | ||
864 | { | ||
865 | *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; | ||
866 | return EINA_FALSE; | ||
867 | } | ||
868 | |||
869 | gif = DGifOpenFileHandle(fd); | ||
870 | if (!gif) | ||
871 | { | ||
872 | if (fd) close(fd); | ||
873 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
874 | return EINA_FALSE; | ||
875 | } | ||
876 | _evas_image_skip_frame(gif, cur_frame_index-1); | ||
877 | if (!_evas_image_load_frame(ie, gif, frame, LOAD_FRAME_DATA,error)) | ||
878 | { | ||
879 | if (fd) close(fd); | ||
880 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
881 | return EINA_FALSE; | ||
882 | } | ||
883 | if (!evas_image_load_file_data_gif_internal(ie, frame, error)) | ||
884 | { | ||
885 | if (fd) close(fd); | ||
886 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
887 | return EINA_FALSE; | ||
888 | } | ||
889 | DGifCloseFile(gif); | ||
890 | *error = EVAS_LOAD_ERROR_NONE; | ||
891 | return EINA_TRUE; | ||
892 | } | ||
893 | } | ||
894 | /* current frame does is not exist */ | ||
895 | else | ||
896 | { | ||
897 | if (!evas_image_load_specific_frame(ie, file, cur_frame_index, error)) | ||
898 | { | ||
899 | return EINA_FALSE; | ||
900 | } | ||
901 | hit = EINA_FALSE; | ||
902 | frame = NULL; | ||
903 | hit = _find_frame(ie, cur_frame_index, &frame); | ||
904 | if (!hit) return EINA_FALSE; | ||
905 | if (!evas_image_load_file_data_gif_internal(ie, frame, error)) | ||
906 | { | ||
907 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
908 | return EINA_FALSE; | ||
909 | } | ||
910 | return EINA_TRUE; | ||
911 | } | ||
912 | return EINA_FALSE; | ||
913 | } | ||
914 | |||
915 | static double | ||
916 | evas_image_load_frame_duration_gif(Image_Entry *ie, const char *file, const int start_frame, const int frame_num) | ||
917 | { | ||
918 | int fd; | ||
919 | GifFileType *gif; | ||
920 | GifRecordType rec; | ||
921 | int done; | ||
922 | int current_frame = 1; | ||
923 | int remain_frames = frame_num; | ||
924 | double duration = 0; | ||
925 | int frame_count = 0; | ||
926 | |||
927 | frame_count = ie->frame_count; | ||
928 | |||
929 | if (!ie->flags.animated) return -1; | ||
930 | if ((start_frame + frame_num) > frame_count) return -1; | ||
931 | if (frame_num < 0) return -1; | ||
932 | |||
933 | done = 0; | ||
934 | |||
935 | #ifndef __EMX__ | ||
936 | fd = open(file, O_RDONLY); | ||
937 | #else | ||
938 | fd = open(file, O_RDONLY | O_BINARY); | ||
939 | #endif | ||
940 | if (fd < 0) return -1; | ||
941 | |||
942 | gif = DGifOpenFileHandle(fd); | ||
943 | if (!gif) | ||
944 | { | ||
945 | if (fd) close(fd); | ||
946 | return -1; | ||
947 | } | ||
948 | |||
949 | do | ||
950 | { | ||
951 | if (DGifGetRecordType(gif, &rec) == GIF_ERROR) | ||
952 | { | ||
953 | rec = TERMINATE_RECORD_TYPE; | ||
954 | } | ||
955 | if (rec == IMAGE_DESC_RECORD_TYPE) | ||
956 | { | ||
957 | int img_code; | ||
958 | GifByteType *img; | ||
959 | |||
960 | if (DGifGetImageDesc(gif) == GIF_ERROR) | ||
961 | { | ||
962 | /* PrintGifError(); */ | ||
963 | rec = TERMINATE_RECORD_TYPE; | ||
964 | } | ||
965 | current_frame++; | ||
966 | /* we have to count frame, so use DGifGetCode and skip decoding */ | ||
967 | if (DGifGetCode(gif, &img_code, &img) == GIF_ERROR) | ||
968 | { | ||
969 | rec = TERMINATE_RECORD_TYPE; | ||
970 | } | ||
971 | while (img) | ||
972 | { | ||
973 | img = NULL; | ||
974 | DGifGetExtensionNext(gif, &img); | ||
975 | } | ||
976 | } | ||
977 | else if (rec == EXTENSION_RECORD_TYPE) | ||
978 | { | ||
979 | int ext_code; | ||
980 | GifByteType *ext; | ||
981 | |||
982 | ext = NULL; | ||
983 | DGifGetExtension(gif, &ext_code, &ext); | ||
984 | while (ext) | ||
985 | { | ||
986 | if (ext_code == 0xf9) /* Graphic Control Extension */ | ||
987 | { | ||
988 | if ((current_frame >= start_frame) && (current_frame <= frame_count)) | ||
989 | { | ||
990 | int frame_duration = 0; | ||
991 | if (remain_frames < 0) break; | ||
992 | frame_duration = byte2_to_int (ext[2], ext[3]); | ||
993 | if (frame_duration == 0) | ||
994 | duration += 0.1; | ||
995 | else | ||
996 | duration += (double)frame_duration/100; | ||
997 | remain_frames --; | ||
998 | } | ||
999 | } | ||
1000 | ext = NULL; | ||
1001 | DGifGetExtensionNext(gif, &ext); | ||
1002 | } | ||
1003 | } | ||
1004 | } while (rec != TERMINATE_RECORD_TYPE); | ||
1005 | |||
1006 | DGifCloseFile(gif); | ||
1007 | return duration; | ||
1008 | } | ||
1009 | |||
1010 | static int | ||
1011 | module_open(Evas_Module *em) | ||
1012 | { | ||
1013 | if (!em) return 0; | ||
1014 | em->functions = (void *)(&evas_image_load_gif_func); | ||
1015 | return 1; | ||
1016 | } | ||
1017 | |||
1018 | static void | ||
1019 | module_close(Evas_Module *em __UNUSED__) | ||
1020 | { | ||
1021 | } | ||
1022 | |||
1023 | static Evas_Module_Api evas_modapi = | ||
1024 | { | ||
1025 | EVAS_MODULE_API_VERSION, | ||
1026 | "gif", | ||
1027 | "none", | ||
1028 | { | ||
1029 | module_open, | ||
1030 | module_close | ||
1031 | } | ||
1032 | }; | ||
1033 | |||
1034 | EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, gif); | ||
1035 | |||
1036 | #ifndef EVAS_STATIC_BUILD_GIF | ||
1037 | EVAS_EINA_MODULE_DEFINE(image_loader, gif); | ||
1038 | #endif | ||