diff options
author | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 17:29:19 +1000 |
commit | 07274513e984f0b5544586c74508ccd16e7dcafa (patch) | |
tree | b32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/evas/src/modules/loaders/jpeg | |
parent | Added Irrlicht 1.8, but without all the Windows binaries. (diff) | |
download | SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2 SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz |
Remove EFL, since it's been released now.
Diffstat (limited to 'libraries/evas/src/modules/loaders/jpeg')
-rw-r--r-- | libraries/evas/src/modules/loaders/jpeg/Makefile.am | 33 | ||||
-rw-r--r-- | libraries/evas/src/modules/loaders/jpeg/Makefile.in | 762 | ||||
-rw-r--r-- | libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c | 1275 |
3 files changed, 0 insertions, 2070 deletions
diff --git a/libraries/evas/src/modules/loaders/jpeg/Makefile.am b/libraries/evas/src/modules/loaders/jpeg/Makefile.am deleted file mode 100644 index a7a19ab..0000000 --- a/libraries/evas/src/modules/loaders/jpeg/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 | @EINA_CFLAGS@ \ | ||
11 | @evas_image_loader_jpeg_cflags@ \ | ||
12 | @EVIL_CFLAGS@ | ||
13 | |||
14 | if BUILD_LOADER_JPEG | ||
15 | if !EVAS_STATIC_BUILD_JPEG | ||
16 | |||
17 | pkgdir = $(libdir)/evas/modules/loaders/jpeg/$(MODULE_ARCH) | ||
18 | pkg_LTLIBRARIES = module.la | ||
19 | |||
20 | module_la_SOURCES = evas_image_load_jpeg.c | ||
21 | |||
22 | module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ @evas_image_loader_jpeg_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_jpeg.la | ||
29 | libevas_loader_jpeg_la_SOURCES = evas_image_load_jpeg.c | ||
30 | libevas_loader_jpeg_la_LIBADD = @evas_image_loader_jpeg_libs@ | ||
31 | |||
32 | endif | ||
33 | endif | ||
diff --git a/libraries/evas/src/modules/loaders/jpeg/Makefile.in b/libraries/evas/src/modules/loaders/jpeg/Makefile.in deleted file mode 100644 index 4945f85..0000000 --- a/libraries/evas/src/modules/loaders/jpeg/Makefile.in +++ /dev/null | |||
@@ -1,762 +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/jpeg | ||
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_jpeg_la_DEPENDENCIES = | ||
83 | am__libevas_loader_jpeg_la_SOURCES_DIST = evas_image_load_jpeg.c | ||
84 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am_libevas_loader_jpeg_la_OBJECTS = evas_image_load_jpeg.lo | ||
85 | libevas_loader_jpeg_la_OBJECTS = $(am_libevas_loader_jpeg_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_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am_libevas_loader_jpeg_la_rpath = | ||
90 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la | ||
91 | am__module_la_SOURCES_DIST = evas_image_load_jpeg.c | ||
92 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_jpeg.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_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@am_module_la_rpath = \ | ||
98 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@ -rpath \ | ||
99 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_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_jpeg_la_SOURCES) $(module_la_SOURCES) | ||
127 | DIST_SOURCES = $(am__libevas_loader_jpeg_la_SOURCES_DIST) \ | ||
128 | $(am__module_la_SOURCES_DIST) | ||
129 | ETAGS = etags | ||
130 | CTAGS = ctags | ||
131 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
132 | ACLOCAL = @ACLOCAL@ | ||
133 | ALLOCA = @ALLOCA@ | ||
134 | AMTAR = @AMTAR@ | ||
135 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
136 | AR = @AR@ | ||
137 | AS = @AS@ | ||
138 | AUTOCONF = @AUTOCONF@ | ||
139 | AUTOHEADER = @AUTOHEADER@ | ||
140 | AUTOMAKE = @AUTOMAKE@ | ||
141 | AWK = @AWK@ | ||
142 | CC = @CC@ | ||
143 | CCDEPMODE = @CCDEPMODE@ | ||
144 | CFLAGS = @CFLAGS@ | ||
145 | CHECK_CFLAGS = @CHECK_CFLAGS@ | ||
146 | CHECK_LIBS = @CHECK_LIBS@ | ||
147 | CPP = @CPP@ | ||
148 | CPPFLAGS = @CPPFLAGS@ | ||
149 | CXX = @CXX@ | ||
150 | CXXCPP = @CXXCPP@ | ||
151 | CXXDEPMODE = @CXXDEPMODE@ | ||
152 | CXXFLAGS = @CXXFLAGS@ | ||
153 | CYGPATH_W = @CYGPATH_W@ | ||
154 | DEFS = @DEFS@ | ||
155 | DEPDIR = @DEPDIR@ | ||
156 | DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ | ||
157 | DIRECTFB_LIBS = @DIRECTFB_LIBS@ | ||
158 | DLLTOOL = @DLLTOOL@ | ||
159 | DSYMUTIL = @DSYMUTIL@ | ||
160 | DUMPBIN = @DUMPBIN@ | ||
161 | ECHO_C = @ECHO_C@ | ||
162 | ECHO_N = @ECHO_N@ | ||
163 | ECHO_T = @ECHO_T@ | ||
164 | ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@ | ||
165 | ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@ | ||
166 | EDB_CFLAGS = @EDB_CFLAGS@ | ||
167 | EDB_LIBS = @EDB_LIBS@ | ||
168 | EDJE_CFLAGS = @EDJE_CFLAGS@ | ||
169 | EDJE_LIBS = @EDJE_LIBS@ | ||
170 | EET_CFLAGS = @EET_CFLAGS@ | ||
171 | EET_LIBS = @EET_LIBS@ | ||
172 | EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@ | ||
173 | EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@ | ||
174 | EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@ | ||
175 | EGREP = @EGREP@ | ||
176 | EINA_CFLAGS = @EINA_CFLAGS@ | ||
177 | EINA_LIBS = @EINA_LIBS@ | ||
178 | EVAS_CFLAGS = @EVAS_CFLAGS@ | ||
179 | EVAS_LIBS = @EVAS_LIBS@ | ||
180 | EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@ | ||
181 | EVIL_CFLAGS = @EVIL_CFLAGS@ | ||
182 | EVIL_LIBS = @EVIL_LIBS@ | ||
183 | EXEEXT = @EXEEXT@ | ||
184 | EXOTIC_CFLAGS = @EXOTIC_CFLAGS@ | ||
185 | EXOTIC_LIBS = @EXOTIC_LIBS@ | ||
186 | FGREP = @FGREP@ | ||
187 | FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ | ||
188 | FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ | ||
189 | FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ | ||
190 | FREETYPE_LIBS = @FREETYPE_LIBS@ | ||
191 | FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@ | ||
192 | FRIBIDI_LIBS = @FRIBIDI_LIBS@ | ||
193 | GL_EET_CFLAGS = @GL_EET_CFLAGS@ | ||
194 | GL_EET_LIBS = @GL_EET_LIBS@ | ||
195 | GREP = @GREP@ | ||
196 | HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ | ||
197 | HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ | ||
198 | INSTALL = @INSTALL@ | ||
199 | INSTALL_DATA = @INSTALL_DATA@ | ||
200 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
201 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
202 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
203 | LD = @LD@ | ||
204 | LDFLAGS = @LDFLAGS@ | ||
205 | LIBOBJS = @LIBOBJS@ | ||
206 | LIBS = @LIBS@ | ||
207 | LIBTOOL = @LIBTOOL@ | ||
208 | LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@ | ||
209 | LINEBREAK_LIBS = @LINEBREAK_LIBS@ | ||
210 | LIPO = @LIPO@ | ||
211 | LN_S = @LN_S@ | ||
212 | LTLIBOBJS = @LTLIBOBJS@ | ||
213 | MAKEINFO = @MAKEINFO@ | ||
214 | MKDIR_P = @MKDIR_P@ | ||
215 | MODULE_ARCH = @MODULE_ARCH@ | ||
216 | NM = @NM@ | ||
217 | NMEDIT = @NMEDIT@ | ||
218 | OBJC = @OBJC@ | ||
219 | OBJCDEPMODE = @OBJCDEPMODE@ | ||
220 | OBJCFLAGS = @OBJCFLAGS@ | ||
221 | OBJDUMP = @OBJDUMP@ | ||
222 | OBJEXT = @OBJEXT@ | ||
223 | OTOOL = @OTOOL@ | ||
224 | OTOOL64 = @OTOOL64@ | ||
225 | PACKAGE = @PACKAGE@ | ||
226 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
227 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
228 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
229 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
230 | PACKAGE_URL = @PACKAGE_URL@ | ||
231 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
232 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
233 | PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ | ||
234 | PIXMAN_LIBS = @PIXMAN_LIBS@ | ||
235 | PKG_CONFIG = @PKG_CONFIG@ | ||
236 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
237 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
238 | PNG_CFLAGS = @PNG_CFLAGS@ | ||
239 | PNG_LIBS = @PNG_LIBS@ | ||
240 | RANLIB = @RANLIB@ | ||
241 | SDL_CFLAGS = @SDL_CFLAGS@ | ||
242 | SDL_LIBS = @SDL_LIBS@ | ||
243 | SED = @SED@ | ||
244 | SET_MAKE = @SET_MAKE@ | ||
245 | SHELL = @SHELL@ | ||
246 | SHM_OPEN_LINK = @SHM_OPEN_LINK@ | ||
247 | STRIP = @STRIP@ | ||
248 | SVG_CFLAGS = @SVG_CFLAGS@ | ||
249 | SVG_LIBS = @SVG_LIBS@ | ||
250 | VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ | ||
251 | VALGRIND_LIBS = @VALGRIND_LIBS@ | ||
252 | VERSION = @VERSION@ | ||
253 | VMAJ = @VMAJ@ | ||
254 | WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@ | ||
255 | WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@ | ||
256 | XCB_CFLAGS = @XCB_CFLAGS@ | ||
257 | XCB_GL_CFLAGS = @XCB_GL_CFLAGS@ | ||
258 | XCB_GL_LIBS = @XCB_GL_LIBS@ | ||
259 | XCB_LIBS = @XCB_LIBS@ | ||
260 | XEXT_CFLAGS = @XEXT_CFLAGS@ | ||
261 | XEXT_LIBS = @XEXT_LIBS@ | ||
262 | XMKMF = @XMKMF@ | ||
263 | X_CFLAGS = @X_CFLAGS@ | ||
264 | X_EXTRA_LIBS = @X_EXTRA_LIBS@ | ||
265 | X_LIBS = @X_LIBS@ | ||
266 | X_PRE_LIBS = @X_PRE_LIBS@ | ||
267 | abs_builddir = @abs_builddir@ | ||
268 | abs_srcdir = @abs_srcdir@ | ||
269 | abs_top_builddir = @abs_top_builddir@ | ||
270 | abs_top_srcdir = @abs_top_srcdir@ | ||
271 | ac_ct_CC = @ac_ct_CC@ | ||
272 | ac_ct_CXX = @ac_ct_CXX@ | ||
273 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ | ||
274 | ac_ct_OBJC = @ac_ct_OBJC@ | ||
275 | altivec_cflags = @altivec_cflags@ | ||
276 | am__include = @am__include@ | ||
277 | am__leading_dot = @am__leading_dot@ | ||
278 | am__quote = @am__quote@ | ||
279 | am__tar = @am__tar@ | ||
280 | am__untar = @am__untar@ | ||
281 | bindir = @bindir@ | ||
282 | build = @build@ | ||
283 | build_alias = @build_alias@ | ||
284 | build_cpu = @build_cpu@ | ||
285 | build_os = @build_os@ | ||
286 | build_vendor = @build_vendor@ | ||
287 | builddir = @builddir@ | ||
288 | datadir = @datadir@ | ||
289 | datarootdir = @datarootdir@ | ||
290 | dlopen_libs = @dlopen_libs@ | ||
291 | docdir = @docdir@ | ||
292 | dvidir = @dvidir@ | ||
293 | edje_cc = @edje_cc@ | ||
294 | efl_doxygen = @efl_doxygen@ | ||
295 | efl_have_doxygen = @efl_have_doxygen@ | ||
296 | evas_engine_buffer_cflags = @evas_engine_buffer_cflags@ | ||
297 | evas_engine_buffer_libs = @evas_engine_buffer_libs@ | ||
298 | evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@ | ||
299 | evas_engine_direct3d_libs = @evas_engine_direct3d_libs@ | ||
300 | evas_engine_directfb_cflags = @evas_engine_directfb_cflags@ | ||
301 | evas_engine_directfb_libs = @evas_engine_directfb_libs@ | ||
302 | evas_engine_fb_cflags = @evas_engine_fb_cflags@ | ||
303 | evas_engine_fb_libs = @evas_engine_fb_libs@ | ||
304 | evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@ | ||
305 | evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@ | ||
306 | evas_engine_gl_common_libs = @evas_engine_gl_common_libs@ | ||
307 | evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@ | ||
308 | evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@ | ||
309 | evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@ | ||
310 | evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@ | ||
311 | evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@ | ||
312 | evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@ | ||
313 | evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@ | ||
314 | evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@ | ||
315 | evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@ | ||
316 | evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@ | ||
317 | evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@ | ||
318 | evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@ | ||
319 | evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@ | ||
320 | evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@ | ||
321 | evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@ | ||
322 | evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@ | ||
323 | evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@ | ||
324 | evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@ | ||
325 | evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@ | ||
326 | evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@ | ||
327 | evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@ | ||
328 | evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@ | ||
329 | evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@ | ||
330 | evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@ | ||
331 | evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@ | ||
332 | evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@ | ||
333 | evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@ | ||
334 | evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@ | ||
335 | evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@ | ||
336 | evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@ | ||
337 | evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@ | ||
338 | evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@ | ||
339 | evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@ | ||
340 | evas_image_loader_edb_libs = @evas_image_loader_edb_libs@ | ||
341 | evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@ | ||
342 | evas_image_loader_eet_libs = @evas_image_loader_eet_libs@ | ||
343 | evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@ | ||
344 | evas_image_loader_generic_libs = @evas_image_loader_generic_libs@ | ||
345 | evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@ | ||
346 | evas_image_loader_gif_libs = @evas_image_loader_gif_libs@ | ||
347 | evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@ | ||
348 | evas_image_loader_ico_libs = @evas_image_loader_ico_libs@ | ||
349 | evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@ | ||
350 | evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@ | ||
351 | evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@ | ||
352 | evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@ | ||
353 | evas_image_loader_png_cflags = @evas_image_loader_png_cflags@ | ||
354 | evas_image_loader_png_libs = @evas_image_loader_png_libs@ | ||
355 | evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@ | ||
356 | evas_image_loader_psd_libs = @evas_image_loader_psd_libs@ | ||
357 | evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@ | ||
358 | evas_image_loader_svg_libs = @evas_image_loader_svg_libs@ | ||
359 | evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@ | ||
360 | evas_image_loader_tga_libs = @evas_image_loader_tga_libs@ | ||
361 | evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@ | ||
362 | evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@ | ||
363 | evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@ | ||
364 | evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@ | ||
365 | evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@ | ||
366 | evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@ | ||
367 | exec_prefix = @exec_prefix@ | ||
368 | have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@ | ||
369 | have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@ | ||
370 | have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@ | ||
371 | have_evas_engine_software_x11 = @have_evas_engine_software_x11@ | ||
372 | have_evas_engine_software_xcb = @have_evas_engine_software_xcb@ | ||
373 | have_evas_engine_software_xlib = @have_evas_engine_software_xlib@ | ||
374 | have_lcov = @have_lcov@ | ||
375 | host = @host@ | ||
376 | host_alias = @host_alias@ | ||
377 | host_cpu = @host_cpu@ | ||
378 | host_os = @host_os@ | ||
379 | host_vendor = @host_vendor@ | ||
380 | htmldir = @htmldir@ | ||
381 | includedir = @includedir@ | ||
382 | infodir = @infodir@ | ||
383 | install_sh = @install_sh@ | ||
384 | libdir = @libdir@ | ||
385 | libexecdir = @libexecdir@ | ||
386 | localedir = @localedir@ | ||
387 | localstatedir = @localstatedir@ | ||
388 | lt_ECHO = @lt_ECHO@ | ||
389 | lt_enable_auto_import = @lt_enable_auto_import@ | ||
390 | mandir = @mandir@ | ||
391 | mkdir_p = @mkdir_p@ | ||
392 | oldincludedir = @oldincludedir@ | ||
393 | pdfdir = @pdfdir@ | ||
394 | pkgconfig_requires_private = @pkgconfig_requires_private@ | ||
395 | prefix = @prefix@ | ||
396 | program_transform_name = @program_transform_name@ | ||
397 | psdir = @psdir@ | ||
398 | pthread_cflags = @pthread_cflags@ | ||
399 | pthread_libs = @pthread_libs@ | ||
400 | release_info = @release_info@ | ||
401 | requirement_evas = @requirement_evas@ | ||
402 | sbindir = @sbindir@ | ||
403 | sharedstatedir = @sharedstatedir@ | ||
404 | srcdir = @srcdir@ | ||
405 | sysconfdir = @sysconfdir@ | ||
406 | target_alias = @target_alias@ | ||
407 | top_build_prefix = @top_build_prefix@ | ||
408 | top_builddir = @top_builddir@ | ||
409 | top_srcdir = @top_srcdir@ | ||
410 | version_info = @version_info@ | ||
411 | MAINTAINERCLEANFILES = Makefile.in | ||
412 | AM_CPPFLAGS = \ | ||
413 | -I. \ | ||
414 | -I$(top_srcdir)/src/lib \ | ||
415 | -I$(top_srcdir)/src/lib/include \ | ||
416 | @FREETYPE_CFLAGS@ \ | ||
417 | @PIXMAN_CFLAGS@ \ | ||
418 | @EINA_CFLAGS@ \ | ||
419 | @evas_image_loader_jpeg_cflags@ \ | ||
420 | @EVIL_CFLAGS@ | ||
421 | |||
422 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@pkgdir = $(libdir)/evas/modules/loaders/jpeg/$(MODULE_ARCH) | ||
423 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@pkg_LTLIBRARIES = module.la | ||
424 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_SOURCES = evas_image_load_jpeg.c | ||
425 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ @evas_image_loader_jpeg_libs@ $(top_builddir)/src/lib/libevas.la | ||
426 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version | ||
427 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static | ||
428 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@noinst_LTLIBRARIES = libevas_loader_jpeg.la | ||
429 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@libevas_loader_jpeg_la_SOURCES = evas_image_load_jpeg.c | ||
430 | @BUILD_LOADER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@libevas_loader_jpeg_la_LIBADD = @evas_image_loader_jpeg_libs@ | ||
431 | all: all-am | ||
432 | |||
433 | .SUFFIXES: | ||
434 | .SUFFIXES: .c .lo .o .obj | ||
435 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
436 | @for dep in $?; do \ | ||
437 | case '$(am__configure_deps)' in \ | ||
438 | *$$dep*) \ | ||
439 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | ||
440 | && { if test -f $@; then exit 0; else break; fi; }; \ | ||
441 | exit 1;; \ | ||
442 | esac; \ | ||
443 | done; \ | ||
444 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/jpeg/Makefile'; \ | ||
445 | $(am__cd) $(top_srcdir) && \ | ||
446 | $(AUTOMAKE) --gnu src/modules/loaders/jpeg/Makefile | ||
447 | .PRECIOUS: Makefile | ||
448 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
449 | @case '$?' in \ | ||
450 | *config.status*) \ | ||
451 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
452 | *) \ | ||
453 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
454 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
455 | esac; | ||
456 | |||
457 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
458 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
459 | |||
460 | $(top_srcdir)/configure: $(am__configure_deps) | ||
461 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
462 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
463 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
464 | $(am__aclocal_m4_deps): | ||
465 | |||
466 | clean-noinstLTLIBRARIES: | ||
467 | -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) | ||
468 | @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ | ||
469 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
470 | test "$$dir" != "$$p" || dir=.; \ | ||
471 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
472 | rm -f "$${dir}/so_locations"; \ | ||
473 | done | ||
474 | install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES) | ||
475 | @$(NORMAL_INSTALL) | ||
476 | test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)" | ||
477 | @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ | ||
478 | list2=; for p in $$list; do \ | ||
479 | if test -f $$p; then \ | ||
480 | list2="$$list2 $$p"; \ | ||
481 | else :; fi; \ | ||
482 | done; \ | ||
483 | test -z "$$list2" || { \ | ||
484 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \ | ||
485 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \ | ||
486 | } | ||
487 | |||
488 | uninstall-pkgLTLIBRARIES: | ||
489 | @$(NORMAL_UNINSTALL) | ||
490 | @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \ | ||
491 | for p in $$list; do \ | ||
492 | $(am__strip_dir) \ | ||
493 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \ | ||
494 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \ | ||
495 | done | ||
496 | |||
497 | clean-pkgLTLIBRARIES: | ||
498 | -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES) | ||
499 | @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \ | ||
500 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
501 | test "$$dir" != "$$p" || dir=.; \ | ||
502 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
503 | rm -f "$${dir}/so_locations"; \ | ||
504 | done | ||
505 | libevas_loader_jpeg.la: $(libevas_loader_jpeg_la_OBJECTS) $(libevas_loader_jpeg_la_DEPENDENCIES) | ||
506 | $(AM_V_CCLD)$(LINK) $(am_libevas_loader_jpeg_la_rpath) $(libevas_loader_jpeg_la_OBJECTS) $(libevas_loader_jpeg_la_LIBADD) $(LIBS) | ||
507 | module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES) | ||
508 | $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS) | ||
509 | |||
510 | mostlyclean-compile: | ||
511 | -rm -f *.$(OBJEXT) | ||
512 | |||
513 | distclean-compile: | ||
514 | -rm -f *.tab.c | ||
515 | |||
516 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_jpeg.Plo@am__quote@ | ||
517 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_jpeg.Plo@am__quote@ | ||
518 | |||
519 | .c.o: | ||
520 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
521 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
522 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
523 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
524 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
525 | @am__fastdepCC_FALSE@ $(COMPILE) -c $< | ||
526 | |||
527 | .c.obj: | ||
528 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
529 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
530 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
531 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
532 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
533 | @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
534 | |||
535 | .c.lo: | ||
536 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
537 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
538 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
539 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
540 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
541 | @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< | ||
542 | |||
543 | module_la-evas_image_load_jpeg.lo: evas_image_load_jpeg.c | ||
544 | @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_jpeg.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_jpeg.Tpo -c -o module_la-evas_image_load_jpeg.lo `test -f 'evas_image_load_jpeg.c' || echo '$(srcdir)/'`evas_image_load_jpeg.c | ||
545 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_jpeg.Tpo $(DEPDIR)/module_la-evas_image_load_jpeg.Plo | ||
546 | @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ | ||
547 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_jpeg.c' object='module_la-evas_image_load_jpeg.lo' libtool=yes @AMDEPBACKSLASH@ | ||
548 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
549 | @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_jpeg.lo `test -f 'evas_image_load_jpeg.c' || echo '$(srcdir)/'`evas_image_load_jpeg.c | ||
550 | |||
551 | mostlyclean-libtool: | ||
552 | -rm -f *.lo | ||
553 | |||
554 | clean-libtool: | ||
555 | -rm -rf .libs _libs | ||
556 | |||
557 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
558 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
559 | unique=`for i in $$list; do \ | ||
560 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
561 | done | \ | ||
562 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
563 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
564 | mkid -fID $$unique | ||
565 | tags: TAGS | ||
566 | |||
567 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
568 | $(TAGS_FILES) $(LISP) | ||
569 | set x; \ | ||
570 | here=`pwd`; \ | ||
571 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
572 | unique=`for i in $$list; do \ | ||
573 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
574 | done | \ | ||
575 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
576 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
577 | shift; \ | ||
578 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
579 | test -n "$$unique" || unique=$$empty_fix; \ | ||
580 | if test $$# -gt 0; then \ | ||
581 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
582 | "$$@" $$unique; \ | ||
583 | else \ | ||
584 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
585 | $$unique; \ | ||
586 | fi; \ | ||
587 | fi | ||
588 | ctags: CTAGS | ||
589 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
590 | $(TAGS_FILES) $(LISP) | ||
591 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
592 | unique=`for i in $$list; do \ | ||
593 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
594 | done | \ | ||
595 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
596 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
597 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
598 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
599 | $$unique | ||
600 | |||
601 | GTAGS: | ||
602 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
603 | && $(am__cd) $(top_srcdir) \ | ||
604 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
605 | |||
606 | distclean-tags: | ||
607 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
608 | |||
609 | distdir: $(DISTFILES) | ||
610 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
611 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
612 | list='$(DISTFILES)'; \ | ||
613 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
614 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
615 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
616 | case $$dist_files in \ | ||
617 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
618 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
619 | sort -u` ;; \ | ||
620 | esac; \ | ||
621 | for file in $$dist_files; do \ | ||
622 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
623 | if test -d $$d/$$file; then \ | ||
624 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
625 | if test -d "$(distdir)/$$file"; then \ | ||
626 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
627 | fi; \ | ||
628 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
629 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
630 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
631 | fi; \ | ||
632 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
633 | else \ | ||
634 | test -f "$(distdir)/$$file" \ | ||
635 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
636 | || exit 1; \ | ||
637 | fi; \ | ||
638 | done | ||
639 | check-am: all-am | ||
640 | check: check-am | ||
641 | all-am: Makefile $(LTLIBRARIES) | ||
642 | installdirs: | ||
643 | for dir in "$(DESTDIR)$(pkgdir)"; do \ | ||
644 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
645 | done | ||
646 | install: install-am | ||
647 | install-exec: install-exec-am | ||
648 | install-data: install-data-am | ||
649 | uninstall: uninstall-am | ||
650 | |||
651 | install-am: all-am | ||
652 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
653 | |||
654 | installcheck: installcheck-am | ||
655 | install-strip: | ||
656 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
657 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
658 | `test -z '$(STRIP)' || \ | ||
659 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
660 | mostlyclean-generic: | ||
661 | |||
662 | clean-generic: | ||
663 | |||
664 | distclean-generic: | ||
665 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
666 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
667 | |||
668 | maintainer-clean-generic: | ||
669 | @echo "This command is intended for maintainers to use" | ||
670 | @echo "it deletes files that may require special tools to rebuild." | ||
671 | -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) | ||
672 | clean: clean-am | ||
673 | |||
674 | clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ | ||
675 | clean-pkgLTLIBRARIES mostlyclean-am | ||
676 | |||
677 | distclean: distclean-am | ||
678 | -rm -rf ./$(DEPDIR) | ||
679 | -rm -f Makefile | ||
680 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
681 | distclean-tags | ||
682 | |||
683 | dvi: dvi-am | ||
684 | |||
685 | dvi-am: | ||
686 | |||
687 | html: html-am | ||
688 | |||
689 | html-am: | ||
690 | |||
691 | info: info-am | ||
692 | |||
693 | info-am: | ||
694 | |||
695 | install-data-am: install-pkgLTLIBRARIES | ||
696 | |||
697 | install-dvi: install-dvi-am | ||
698 | |||
699 | install-dvi-am: | ||
700 | |||
701 | install-exec-am: | ||
702 | |||
703 | install-html: install-html-am | ||
704 | |||
705 | install-html-am: | ||
706 | |||
707 | install-info: install-info-am | ||
708 | |||
709 | install-info-am: | ||
710 | |||
711 | install-man: | ||
712 | |||
713 | install-pdf: install-pdf-am | ||
714 | |||
715 | install-pdf-am: | ||
716 | |||
717 | install-ps: install-ps-am | ||
718 | |||
719 | install-ps-am: | ||
720 | |||
721 | installcheck-am: | ||
722 | |||
723 | maintainer-clean: maintainer-clean-am | ||
724 | -rm -rf ./$(DEPDIR) | ||
725 | -rm -f Makefile | ||
726 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
727 | |||
728 | mostlyclean: mostlyclean-am | ||
729 | |||
730 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
731 | mostlyclean-libtool | ||
732 | |||
733 | pdf: pdf-am | ||
734 | |||
735 | pdf-am: | ||
736 | |||
737 | ps: ps-am | ||
738 | |||
739 | ps-am: | ||
740 | |||
741 | uninstall-am: uninstall-pkgLTLIBRARIES | ||
742 | |||
743 | .MAKE: install-am install-strip | ||
744 | |||
745 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
746 | clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \ | ||
747 | ctags distclean distclean-compile distclean-generic \ | ||
748 | distclean-libtool distclean-tags distdir dvi dvi-am html \ | ||
749 | html-am info info-am install install-am install-data \ | ||
750 | install-data-am install-dvi install-dvi-am install-exec \ | ||
751 | install-exec-am install-html install-html-am install-info \ | ||
752 | install-info-am install-man install-pdf install-pdf-am \ | ||
753 | install-pkgLTLIBRARIES install-ps install-ps-am install-strip \ | ||
754 | installcheck installcheck-am installdirs maintainer-clean \ | ||
755 | maintainer-clean-generic mostlyclean mostlyclean-compile \ | ||
756 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ | ||
757 | tags uninstall uninstall-am uninstall-pkgLTLIBRARIES | ||
758 | |||
759 | |||
760 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
761 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
762 | .NOEXPORT: | ||
diff --git a/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c b/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c deleted file mode 100644 index 73a7310..0000000 --- a/libraries/evas/src/modules/loaders/jpeg/evas_image_load_jpeg.c +++ /dev/null | |||
@@ -1,1275 +0,0 @@ | |||
1 | #ifdef HAVE_CONFIG_H | ||
2 | # include <config.h> | ||
3 | #endif | ||
4 | |||
5 | #include <stdio.h> | ||
6 | |||
7 | #ifdef HAVE_EVIL | ||
8 | # include <Evil.h> | ||
9 | #endif | ||
10 | |||
11 | #include <setjmp.h> | ||
12 | #include <jpeglib.h> | ||
13 | |||
14 | #include "evas_common.h" | ||
15 | #include "evas_private.h" | ||
16 | |||
17 | |||
18 | typedef struct _JPEG_error_mgr *emptr; | ||
19 | struct _JPEG_error_mgr | ||
20 | { | ||
21 | struct jpeg_error_mgr pub; | ||
22 | jmp_buf setjmp_buffer; | ||
23 | }; | ||
24 | |||
25 | static void _JPEGFatalErrorHandler(j_common_ptr cinfo); | ||
26 | static void _JPEGErrorHandler(j_common_ptr cinfo); | ||
27 | static void _JPEGErrorHandler2(j_common_ptr cinfo, int msg_level); | ||
28 | |||
29 | static Eina_Bool evas_image_load_file_head_jpeg_internal(Image_Entry *ie, | ||
30 | void *map, | ||
31 | size_t len, | ||
32 | int *error) EINA_ARG_NONNULL(1, 2, 4); | ||
33 | static Eina_Bool evas_image_load_file_data_jpeg_internal(Image_Entry *ie, | ||
34 | void *map, | ||
35 | size_t len, | ||
36 | int *error) EINA_ARG_NONNULL(1, 2, 4); | ||
37 | #if 0 /* not used at the moment */ | ||
38 | static int evas_image_load_file_data_jpeg_alpha_internal(Image_Entry *ie, FILE *f) EINA_ARG_NONNULL(1, 2); | ||
39 | #endif | ||
40 | |||
41 | static Eina_Bool evas_image_load_file_head_jpeg(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); | ||
42 | static Eina_Bool evas_image_load_file_data_jpeg(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4); | ||
43 | |||
44 | static Evas_Image_Load_Func evas_image_load_jpeg_func = | ||
45 | { | ||
46 | EINA_TRUE, | ||
47 | evas_image_load_file_head_jpeg, | ||
48 | evas_image_load_file_data_jpeg, | ||
49 | NULL, | ||
50 | EINA_TRUE | ||
51 | }; | ||
52 | |||
53 | |||
54 | static void | ||
55 | _JPEGFatalErrorHandler(j_common_ptr cinfo) | ||
56 | { | ||
57 | emptr errmgr; | ||
58 | |||
59 | errmgr = (emptr) cinfo->err; | ||
60 | /* cinfo->err->output_message(cinfo);*/ | ||
61 | longjmp(errmgr->setjmp_buffer, 1); | ||
62 | return; | ||
63 | } | ||
64 | |||
65 | static void | ||
66 | _JPEGErrorHandler(j_common_ptr cinfo __UNUSED__) | ||
67 | { | ||
68 | /* emptr errmgr; */ | ||
69 | |||
70 | /* errmgr = (emptr) cinfo->err; */ | ||
71 | /* cinfo->err->output_message(cinfo);*/ | ||
72 | /* longjmp(errmgr->setjmp_buffer, 1);*/ | ||
73 | return; | ||
74 | } | ||
75 | |||
76 | static void | ||
77 | _JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__, int msg_level __UNUSED__) | ||
78 | { | ||
79 | /* emptr errmgr; */ | ||
80 | |||
81 | /* errmgr = (emptr) cinfo->err; */ | ||
82 | /* cinfo->err->output_message(cinfo);*/ | ||
83 | /* longjmp(errmgr->setjmp_buffer, 1);*/ | ||
84 | return; | ||
85 | } | ||
86 | |||
87 | struct jpeg_membuf_src | ||
88 | { | ||
89 | struct jpeg_source_mgr pub; | ||
90 | |||
91 | const unsigned char *buf; | ||
92 | size_t len; | ||
93 | struct jpeg_membuf_src *self; | ||
94 | }; | ||
95 | |||
96 | static void | ||
97 | _evas_jpeg_membuf_src_init(j_decompress_ptr cinfo __UNUSED__) | ||
98 | { | ||
99 | } | ||
100 | |||
101 | static boolean | ||
102 | _evas_jpeg_membuf_src_fill(j_decompress_ptr cinfo) | ||
103 | { | ||
104 | static const JOCTET jpeg_eoi[2] = { 0xFF, JPEG_EOI }; | ||
105 | struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src; | ||
106 | |||
107 | src->pub.bytes_in_buffer = sizeof(jpeg_eoi); | ||
108 | src->pub.next_input_byte = jpeg_eoi; | ||
109 | |||
110 | return TRUE; | ||
111 | } | ||
112 | |||
113 | static void | ||
114 | _evas_jpeg_membuf_src_skip(j_decompress_ptr cinfo, | ||
115 | long num_bytes) | ||
116 | { | ||
117 | struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src; | ||
118 | |||
119 | if ((((long)src->pub.bytes_in_buffer - (long)src->len) > num_bytes) || | ||
120 | ((long)src->pub.bytes_in_buffer < num_bytes)) | ||
121 | { | ||
122 | (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)); | ||
123 | return; | ||
124 | } | ||
125 | src->pub.bytes_in_buffer -= num_bytes; | ||
126 | src->pub.next_input_byte += num_bytes; | ||
127 | } | ||
128 | |||
129 | static void | ||
130 | _evas_jpeg_membuf_src_term(j_decompress_ptr cinfo) | ||
131 | { | ||
132 | struct jpeg_membuf_src *src = (struct jpeg_membuf_src *)cinfo->src; | ||
133 | if (!src) return; | ||
134 | free(src); | ||
135 | cinfo->src = NULL; | ||
136 | } | ||
137 | |||
138 | static int | ||
139 | _evas_jpeg_membuf_src(j_decompress_ptr cinfo, | ||
140 | void *map, size_t length) | ||
141 | { | ||
142 | struct jpeg_membuf_src *src; | ||
143 | |||
144 | src = calloc(1, sizeof(*src)); | ||
145 | if (!src) | ||
146 | return -1; | ||
147 | |||
148 | src->self = src; | ||
149 | |||
150 | cinfo->src = &src->pub; | ||
151 | src->buf = map; | ||
152 | src->len = length; | ||
153 | src->pub.init_source = _evas_jpeg_membuf_src_init; | ||
154 | src->pub.fill_input_buffer = _evas_jpeg_membuf_src_fill; | ||
155 | src->pub.skip_input_data = _evas_jpeg_membuf_src_skip; | ||
156 | src->pub.resync_to_restart = jpeg_resync_to_restart; | ||
157 | src->pub.term_source = _evas_jpeg_membuf_src_term; | ||
158 | src->pub.bytes_in_buffer = src->len; | ||
159 | src->pub.next_input_byte = src->buf; | ||
160 | |||
161 | return 0; | ||
162 | } | ||
163 | |||
164 | /*! Magic number for EXIF header & App1*/ | ||
165 | static const unsigned char ExifHeader[] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00}; | ||
166 | static const unsigned char App1[] = {0xff, 0xe1}; | ||
167 | typedef enum { | ||
168 | EXIF_BYTE_ALIGN_II, | ||
169 | EXIF_BYTE_ALIGN_MM | ||
170 | } ExifByteAlign; | ||
171 | |||
172 | static int | ||
173 | _get_orientation(void *map, size_t length) | ||
174 | { | ||
175 | char *buf; | ||
176 | char orientation[2]; | ||
177 | ExifByteAlign byte_align; | ||
178 | unsigned int num_directory = 0; | ||
179 | unsigned int i, j; | ||
180 | int direction; | ||
181 | |||
182 | /* open file and get 22 byte frome file */ | ||
183 | if (!map) return 0; | ||
184 | /* 1. read 22byte */ | ||
185 | if (length < 22) return 0; | ||
186 | buf = (char *)map; | ||
187 | |||
188 | /* 2. check 2,3 bypte with APP1(0xFFE1) */ | ||
189 | if (memcmp(buf + 2, App1, sizeof (App1))) return 0; | ||
190 | |||
191 | /* 3. check 6~11bype with Exif Header (0x45786966 0000) */ | ||
192 | if (memcmp(buf + 6, ExifHeader, sizeof (ExifHeader))) return 0; | ||
193 | |||
194 | /* 4. get 12&13 byte get info of "II(0x4949)" or "MM(0x4d4d)" */ | ||
195 | /* 5. get [20]&[21] get directory entry # */ | ||
196 | if (!strncmp(buf + 12, "MM", 2)) | ||
197 | { | ||
198 | byte_align = EXIF_BYTE_ALIGN_MM; | ||
199 | num_directory = ((*(buf + 20) << 8) + *(buf + 21)); | ||
200 | orientation[0] = 0x01; | ||
201 | orientation[1] = 0x12; | ||
202 | } | ||
203 | else if (!strncmp(buf + 12, "II", 2)) | ||
204 | { | ||
205 | byte_align = EXIF_BYTE_ALIGN_II; | ||
206 | num_directory = ((*(buf + 21) << 8) + *(buf + 20)); | ||
207 | orientation[0] = 0x12; | ||
208 | orientation[1] = 0x01; | ||
209 | } | ||
210 | else return 0; | ||
211 | |||
212 | buf = map + 22; | ||
213 | |||
214 | if (length < (12 * num_directory + 22)) return 0; | ||
215 | |||
216 | j = 0; | ||
217 | |||
218 | for (i = 0; i < num_directory; i++ ) | ||
219 | { | ||
220 | if (!strncmp(buf + j, orientation, 2)) | ||
221 | { | ||
222 | /*get orientation tag */ | ||
223 | if (byte_align == EXIF_BYTE_ALIGN_MM) | ||
224 | direction = *(buf+ j + 11); | ||
225 | else direction = *(buf+ j + 8); | ||
226 | switch (direction) | ||
227 | { | ||
228 | case 3: | ||
229 | case 4: | ||
230 | return 180; | ||
231 | case 6: | ||
232 | case 7: | ||
233 | return 90; | ||
234 | case 5: | ||
235 | case 8: | ||
236 | return 270; | ||
237 | default: | ||
238 | return 0; | ||
239 | } | ||
240 | } | ||
241 | else | ||
242 | j = j + 12; | ||
243 | } | ||
244 | return 0; | ||
245 | } | ||
246 | |||
247 | static Eina_Bool | ||
248 | evas_image_load_file_head_jpeg_internal(Image_Entry *ie, | ||
249 | void *map, size_t length, | ||
250 | int *error) | ||
251 | { | ||
252 | unsigned int w, h, scalew, scaleh; | ||
253 | struct jpeg_decompress_struct cinfo; | ||
254 | struct _JPEG_error_mgr jerr; | ||
255 | |||
256 | /* for rotation decoding */ | ||
257 | int degree = 0; | ||
258 | Eina_Bool change_wh = EINA_FALSE; | ||
259 | unsigned int load_opts_w = 0, load_opts_h = 0; | ||
260 | |||
261 | cinfo.err = jpeg_std_error(&(jerr.pub)); | ||
262 | jerr.pub.error_exit = _JPEGFatalErrorHandler; | ||
263 | jerr.pub.emit_message = _JPEGErrorHandler2; | ||
264 | jerr.pub.output_message = _JPEGErrorHandler; | ||
265 | if (setjmp(jerr.setjmp_buffer)) | ||
266 | { | ||
267 | jpeg_destroy_decompress(&cinfo); | ||
268 | _evas_jpeg_membuf_src_term(&cinfo); | ||
269 | if (cinfo.saw_JFIF_marker) | ||
270 | *error = EVAS_LOAD_ERROR_CORRUPT_FILE; | ||
271 | else | ||
272 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
273 | return EINA_FALSE; | ||
274 | } | ||
275 | jpeg_create_decompress(&cinfo); | ||
276 | |||
277 | if (_evas_jpeg_membuf_src(&cinfo, map, length)) | ||
278 | { | ||
279 | jpeg_destroy_decompress(&cinfo); | ||
280 | _evas_jpeg_membuf_src_term(&cinfo); | ||
281 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
282 | return EINA_FALSE; | ||
283 | } | ||
284 | |||
285 | jpeg_read_header(&cinfo, TRUE); | ||
286 | cinfo.do_fancy_upsampling = FALSE; | ||
287 | cinfo.do_block_smoothing = FALSE; | ||
288 | cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss) | ||
289 | cinfo.dither_mode = JDITHER_ORDERED; | ||
290 | jpeg_start_decompress(&cinfo); | ||
291 | |||
292 | /* rotation decoding */ | ||
293 | if (ie->load_opts.orientation) | ||
294 | { | ||
295 | degree = _get_orientation(map, length); | ||
296 | if (degree != 0) | ||
297 | { | ||
298 | ie->load_opts.degree = degree; | ||
299 | ie->flags.rotated = EINA_TRUE; | ||
300 | |||
301 | if (degree == 90 || degree == 270) | ||
302 | change_wh = EINA_TRUE; | ||
303 | } | ||
304 | |||
305 | } | ||
306 | |||
307 | /* head decoding */ | ||
308 | w = cinfo.output_width; | ||
309 | h = cinfo.output_height; | ||
310 | if ((w < 1) || (h < 1) || (w > IMG_MAX_SIZE) || (h > IMG_MAX_SIZE) || | ||
311 | (IMG_TOO_BIG(w, h))) | ||
312 | { | ||
313 | jpeg_destroy_decompress(&cinfo); | ||
314 | _evas_jpeg_membuf_src_term(&cinfo); | ||
315 | if (IMG_TOO_BIG(w, h)) | ||
316 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
317 | else | ||
318 | *error = EVAS_LOAD_ERROR_GENERIC; | ||
319 | return EINA_FALSE; | ||
320 | } | ||
321 | if (ie->load_opts.scale_down_by > 1) | ||
322 | { | ||
323 | w /= ie->load_opts.scale_down_by; | ||
324 | h /= ie->load_opts.scale_down_by; | ||
325 | } | ||
326 | else if (ie->load_opts.dpi > 0.0) | ||
327 | { | ||
328 | w = (w * ie->load_opts.dpi) / 90.0; | ||
329 | h = (h * ie->load_opts.dpi) / 90.0; | ||
330 | } | ||
331 | else if ((ie->load_opts.w > 0) && (ie->load_opts.h > 0)) | ||
332 | { | ||
333 | unsigned int w2 = w, h2 = h; | ||
334 | /* user set load_opts' w,h on the assumption | ||
335 | that image already rotated according to it's orientation info */ | ||
336 | if (change_wh) | ||
337 | { | ||
338 | load_opts_w = ie->load_opts.w; | ||
339 | load_opts_h = ie->load_opts.h; | ||
340 | ie->load_opts.w = load_opts_h; | ||
341 | ie->load_opts.h = load_opts_w; | ||
342 | } | ||
343 | |||
344 | if (ie->load_opts.w > 0) | ||
345 | { | ||
346 | w2 = ie->load_opts.w; | ||
347 | h2 = (ie->load_opts.w * h) / w; | ||
348 | if ((ie->load_opts.h > 0) && (h2 > ie->load_opts.h)) | ||
349 | { | ||
350 | unsigned int w3; | ||
351 | h2 = ie->load_opts.h; | ||
352 | w3 = (ie->load_opts.h * w) / h; | ||
353 | if (w3 > w2) | ||
354 | w2 = w3; | ||
355 | } | ||
356 | } | ||
357 | else if (ie->load_opts.h > 0) | ||
358 | { | ||
359 | h2 = ie->load_opts.h; | ||
360 | w2 = (ie->load_opts.h * w) / h; | ||
361 | } | ||
362 | w = w2; | ||
363 | h = h2; | ||
364 | if (change_wh) | ||
365 | { | ||
366 | ie->load_opts.w = load_opts_w; | ||
367 | ie->load_opts.h = load_opts_h; | ||
368 | } | ||
369 | } | ||
370 | if (w < 1) w = 1; | ||
371 | if (h < 1) h = 1; | ||
372 | |||
373 | if ((w != cinfo.output_width) || (h != cinfo.output_height)) | ||
374 | { | ||
375 | scalew = cinfo.output_width / w; | ||
376 | scaleh = cinfo.output_height / h; | ||
377 | |||
378 | ie->scale = scalew; | ||
379 | if (scaleh < scalew) ie->scale = scaleh; | ||
380 | |||
381 | if (ie->scale > 8) ie->scale = 8; | ||
382 | else if (ie->scale < 1) ie->scale = 1; | ||
383 | |||
384 | if (ie->scale == 3) ie->scale = 2; | ||
385 | else if (ie->scale == 5) ie->scale = 4; | ||
386 | else if (ie->scale == 6) ie->scale = 4; | ||
387 | else if (ie->scale == 7) ie->scale = 4; | ||
388 | } | ||
389 | |||
390 | if (ie->scale > 1) | ||
391 | { | ||
392 | jpeg_destroy_decompress(&cinfo); | ||
393 | _evas_jpeg_membuf_src_term(&cinfo); | ||
394 | jpeg_create_decompress(&cinfo); | ||
395 | |||
396 | if (_evas_jpeg_membuf_src(&cinfo, map, length)) | ||
397 | { | ||
398 | jpeg_destroy_decompress(&cinfo); | ||
399 | _evas_jpeg_membuf_src_term(&cinfo); | ||
400 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
401 | return EINA_FALSE; | ||
402 | } | ||
403 | |||
404 | jpeg_read_header(&cinfo, TRUE); | ||
405 | cinfo.do_fancy_upsampling = FALSE; | ||
406 | cinfo.do_block_smoothing = FALSE; | ||
407 | cinfo.scale_num = 1; | ||
408 | cinfo.scale_denom = ie->scale; | ||
409 | jpeg_calc_output_dimensions(&(cinfo)); | ||
410 | jpeg_start_decompress(&cinfo); | ||
411 | } | ||
412 | |||
413 | ie->w = cinfo.output_width; | ||
414 | ie->h = cinfo.output_height; | ||
415 | |||
416 | // be nice and clip region to image. if its totally outside, fail load | ||
417 | if ((ie->load_opts.region.w > 0) && (ie->load_opts.region.h > 0)) | ||
418 | { | ||
419 | unsigned int load_region_x = 0, load_region_y = 0; | ||
420 | unsigned int load_region_w = 0, load_region_h = 0; | ||
421 | if (ie->flags.rotated) | ||
422 | { | ||
423 | load_region_x = ie->load_opts.region.x; | ||
424 | load_region_y = ie->load_opts.region.y; | ||
425 | load_region_w = ie->load_opts.region.w; | ||
426 | load_region_h = ie->load_opts.region.h; | ||
427 | |||
428 | switch (degree) | ||
429 | { | ||
430 | case 90: | ||
431 | ie->load_opts.region.x = load_region_y; | ||
432 | ie->load_opts.region.y = h - (load_region_x + load_region_w); | ||
433 | ie->load_opts.region.w = load_region_h; | ||
434 | ie->load_opts.region.h = load_region_w; | ||
435 | break; | ||
436 | case 180: | ||
437 | ie->load_opts.region.x = w - (load_region_x+ load_region_w); | ||
438 | ie->load_opts.region.y = h - (load_region_y + load_region_h); | ||
439 | |||
440 | break; | ||
441 | case 270: | ||
442 | ie->load_opts.region.x = w - (load_region_y + load_region_h); | ||
443 | ie->load_opts.region.y = load_region_x; | ||
444 | ie->load_opts.region.w = load_region_h; | ||
445 | ie->load_opts.region.h = load_region_w; | ||
446 | break; | ||
447 | default: | ||
448 | break; | ||
449 | } | ||
450 | |||
451 | } | ||
452 | RECTS_CLIP_TO_RECT(ie->load_opts.region.x, ie->load_opts.region.y, | ||
453 | ie->load_opts.region.w, ie->load_opts.region.h, | ||
454 | 0, 0, ie->w, ie->h); | ||
455 | if ((ie->load_opts.region.w <= 0) || (ie->load_opts.region.h <= 0)) | ||
456 | { | ||
457 | jpeg_destroy_decompress(&cinfo); | ||
458 | _evas_jpeg_membuf_src_term(&cinfo); | ||
459 | *error = EVAS_LOAD_ERROR_GENERIC; | ||
460 | return EINA_FALSE; | ||
461 | } | ||
462 | ie->w = ie->load_opts.region.w; | ||
463 | ie->h = ie->load_opts.region.h; | ||
464 | if (ie->flags.rotated) | ||
465 | { | ||
466 | ie->load_opts.region.x = load_region_x; | ||
467 | ie->load_opts.region.y = load_region_y; | ||
468 | ie->load_opts.region.w = load_region_w; | ||
469 | ie->load_opts.region.h = load_region_h; | ||
470 | } | ||
471 | } | ||
472 | /* end head decoding */ | ||
473 | |||
474 | if (change_wh) | ||
475 | { | ||
476 | unsigned int tmp; | ||
477 | tmp = ie->w; | ||
478 | ie->w = ie->h; | ||
479 | ie->h = tmp; | ||
480 | } | ||
481 | jpeg_destroy_decompress(&cinfo); | ||
482 | _evas_jpeg_membuf_src_term(&cinfo); | ||
483 | *error = EVAS_LOAD_ERROR_NONE; | ||
484 | return EINA_TRUE; | ||
485 | } | ||
486 | |||
487 | /* | ||
488 | static double | ||
489 | get_time(void) | ||
490 | { | ||
491 | struct timeval timev; | ||
492 | |||
493 | gettimeofday(&timev, NULL); | ||
494 | return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000); | ||
495 | } | ||
496 | */ | ||
497 | |||
498 | static Eina_Bool | ||
499 | evas_image_load_file_data_jpeg_internal(Image_Entry *ie, | ||
500 | void *map, size_t size, | ||
501 | int *error) | ||
502 | { | ||
503 | unsigned int w, h; | ||
504 | struct jpeg_decompress_struct cinfo; | ||
505 | struct _JPEG_error_mgr jerr; | ||
506 | DATA8 *ptr, *line[16], *data; | ||
507 | DATA32 *ptr2, *ptr_rotate = NULL; | ||
508 | unsigned int x, y, l, i, scans; | ||
509 | int region = 0; | ||
510 | /* rotation setting */ | ||
511 | unsigned int ie_w = 0, ie_h = 0; | ||
512 | unsigned int load_region_x = 0, load_region_y = 0; | ||
513 | unsigned int load_region_w = 0, load_region_h = 0; | ||
514 | volatile int degree = 0; | ||
515 | volatile Eina_Bool change_wh = EINA_FALSE; | ||
516 | Eina_Bool line_done = EINA_FALSE; | ||
517 | |||
518 | if (ie->flags.rotated) | ||
519 | { | ||
520 | degree = ie->load_opts.degree; | ||
521 | if (degree == 90 || degree == 270) | ||
522 | change_wh = EINA_TRUE; | ||
523 | } | ||
524 | |||
525 | cinfo.err = jpeg_std_error(&(jerr.pub)); | ||
526 | jerr.pub.error_exit = _JPEGFatalErrorHandler; | ||
527 | jerr.pub.emit_message = _JPEGErrorHandler2; | ||
528 | jerr.pub.output_message = _JPEGErrorHandler; | ||
529 | if (setjmp(jerr.setjmp_buffer)) | ||
530 | { | ||
531 | jpeg_destroy_decompress(&cinfo); | ||
532 | _evas_jpeg_membuf_src_term(&cinfo); | ||
533 | *error = EVAS_LOAD_ERROR_CORRUPT_FILE; | ||
534 | return EINA_FALSE; | ||
535 | } | ||
536 | jpeg_create_decompress(&cinfo); | ||
537 | |||
538 | if (_evas_jpeg_membuf_src(&cinfo, map, size)) | ||
539 | { | ||
540 | jpeg_destroy_decompress(&cinfo); | ||
541 | _evas_jpeg_membuf_src_term(&cinfo); | ||
542 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
543 | return 0; | ||
544 | } | ||
545 | |||
546 | jpeg_read_header(&cinfo, TRUE); | ||
547 | cinfo.do_fancy_upsampling = FALSE; | ||
548 | cinfo.do_block_smoothing = FALSE; | ||
549 | cinfo.dct_method = JDCT_ISLOW; // JDCT_FLOAT JDCT_IFAST(quality loss) | ||
550 | cinfo.dither_mode = JDITHER_ORDERED; | ||
551 | |||
552 | if (ie->scale > 1) | ||
553 | { | ||
554 | cinfo.scale_num = 1; | ||
555 | cinfo.scale_denom = ie->scale; | ||
556 | } | ||
557 | |||
558 | /* Colorspace conversion options */ | ||
559 | /* libjpeg can do the following conversions: */ | ||
560 | /* GRAYSCLAE => RGB YCbCr => RGB and YCCK => CMYK */ | ||
561 | switch (cinfo.jpeg_color_space) | ||
562 | { | ||
563 | case JCS_UNKNOWN: | ||
564 | break; | ||
565 | case JCS_GRAYSCALE: | ||
566 | case JCS_RGB: | ||
567 | case JCS_YCbCr: | ||
568 | cinfo.out_color_space = JCS_RGB; | ||
569 | break; | ||
570 | case JCS_CMYK: | ||
571 | case JCS_YCCK: | ||
572 | cinfo.out_color_space = JCS_CMYK; | ||
573 | break; | ||
574 | } | ||
575 | |||
576 | /* head decoding */ | ||
577 | jpeg_calc_output_dimensions(&(cinfo)); | ||
578 | jpeg_start_decompress(&cinfo); | ||
579 | |||
580 | w = cinfo.output_width; | ||
581 | h = cinfo.output_height; | ||
582 | |||
583 | if (change_wh) | ||
584 | { | ||
585 | ie_w = ie->h; | ||
586 | ie_h = ie->w; | ||
587 | } | ||
588 | else | ||
589 | { | ||
590 | ie_w = ie->w; | ||
591 | ie_h = ie->h; | ||
592 | } | ||
593 | |||
594 | if ((ie->load_opts.region.w > 0) && (ie->load_opts.region.h > 0)) | ||
595 | { | ||
596 | region = 1; | ||
597 | |||
598 | if (ie->flags.rotated) | ||
599 | { | ||
600 | load_region_x = ie->load_opts.region.x; | ||
601 | load_region_y = ie->load_opts.region.y; | ||
602 | load_region_w = ie->load_opts.region.w; | ||
603 | load_region_h = ie->load_opts.region.h; | ||
604 | |||
605 | switch (degree) | ||
606 | { | ||
607 | case 90: | ||
608 | ie->load_opts.region.x = load_region_y; | ||
609 | ie->load_opts.region.y = h - (load_region_x + load_region_w); | ||
610 | ie->load_opts.region.w = load_region_h; | ||
611 | ie->load_opts.region.h = load_region_w; | ||
612 | break; | ||
613 | case 180: | ||
614 | ie->load_opts.region.x = w - (load_region_x+ load_region_w); | ||
615 | ie->load_opts.region.y = h - (load_region_y + load_region_h); | ||
616 | |||
617 | break; | ||
618 | case 270: | ||
619 | ie->load_opts.region.x = w - (load_region_y + load_region_h); | ||
620 | ie->load_opts.region.y = load_region_x; | ||
621 | ie->load_opts.region.w = load_region_h; | ||
622 | ie->load_opts.region.h = load_region_w; | ||
623 | break; | ||
624 | default: | ||
625 | break; | ||
626 | } | ||
627 | |||
628 | } | ||
629 | #ifdef BUILD_LOADER_JPEG_REGION | ||
630 | cinfo.region_x = ie->load_opts.region.x; | ||
631 | cinfo.region_y = ie->load_opts.region.y; | ||
632 | cinfo.region_w = ie->load_opts.region.w; | ||
633 | cinfo.region_h = ie->load_opts.region.h; | ||
634 | #endif | ||
635 | } | ||
636 | if ((!region) && ((w != ie_w) || (h != ie_h))) | ||
637 | { | ||
638 | // race condition, the file could have change from when we call header | ||
639 | // this test will not solve the problem with region code. | ||
640 | jpeg_destroy_decompress(&cinfo); | ||
641 | _evas_jpeg_membuf_src_term(&cinfo); | ||
642 | *error = EVAS_LOAD_ERROR_GENERIC; | ||
643 | return EINA_FALSE; | ||
644 | } | ||
645 | if ((region) && | ||
646 | ((ie_w != ie->load_opts.region.w) || (ie_h != ie->load_opts.region.h))) | ||
647 | { | ||
648 | ie_w = ie->load_opts.region.w; | ||
649 | ie_h = ie->load_opts.region.h; | ||
650 | if (change_wh) | ||
651 | { | ||
652 | ie->w = ie_h; | ||
653 | ie->h = ie_w; | ||
654 | } | ||
655 | else | ||
656 | { | ||
657 | ie->w = ie_w; | ||
658 | ie->h = ie_h; | ||
659 | } | ||
660 | |||
661 | } | ||
662 | |||
663 | if (!(((cinfo.out_color_space == JCS_RGB) && | ||
664 | ((cinfo.output_components == 3) || (cinfo.output_components == 1))) || | ||
665 | ((cinfo.out_color_space == JCS_CMYK) && (cinfo.output_components == 4)))) | ||
666 | { | ||
667 | jpeg_destroy_decompress(&cinfo); | ||
668 | _evas_jpeg_membuf_src_term(&cinfo); | ||
669 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
670 | return EINA_FALSE; | ||
671 | } | ||
672 | |||
673 | /* end head decoding */ | ||
674 | /* data decoding */ | ||
675 | if (cinfo.rec_outbuf_height > 16) | ||
676 | { | ||
677 | jpeg_destroy_decompress(&cinfo); | ||
678 | _evas_jpeg_membuf_src_term(&cinfo); | ||
679 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
680 | return EINA_FALSE; | ||
681 | } | ||
682 | data = alloca(w * 16 * cinfo.output_components); | ||
683 | evas_cache_image_surface_alloc(ie, ie->w, ie->h); | ||
684 | if (ie->flags.loaded) | ||
685 | { | ||
686 | jpeg_destroy_decompress(&cinfo); | ||
687 | _evas_jpeg_membuf_src_term(&cinfo); | ||
688 | *error = EVAS_LOAD_ERROR_NONE; | ||
689 | if (region && ie->flags.rotated) | ||
690 | { | ||
691 | ie->load_opts.region.x = load_region_x; | ||
692 | ie->load_opts.region.y = load_region_y; | ||
693 | ie->load_opts.region.w = load_region_w; | ||
694 | ie->load_opts.region.h = load_region_h; | ||
695 | } | ||
696 | return EINA_TRUE; | ||
697 | } | ||
698 | if ((ie->flags.rotated) && change_wh) | ||
699 | { | ||
700 | ptr2 = malloc(ie->w * ie->h * sizeof(DATA32)); | ||
701 | ptr_rotate = ptr2; | ||
702 | } | ||
703 | else | ||
704 | ptr2 = evas_cache_image_pixels(ie); | ||
705 | |||
706 | if (!ptr2) | ||
707 | { | ||
708 | *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; | ||
709 | return EINA_FALSE; | ||
710 | } | ||
711 | |||
712 | /* We handle first CMYK (4 components) */ | ||
713 | if (cinfo.output_components == 4) | ||
714 | { | ||
715 | // FIXME: handle region | ||
716 | for (i = 0; (int)i < cinfo.rec_outbuf_height; i++) | ||
717 | line[i] = data + (i * w * 4); | ||
718 | for (l = 0; l < h; l += cinfo.rec_outbuf_height) | ||
719 | { | ||
720 | jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); | ||
721 | scans = cinfo.rec_outbuf_height; | ||
722 | if ((h - l) < scans) scans = h - l; | ||
723 | ptr = data; | ||
724 | if (!region) | ||
725 | { | ||
726 | for (y = 0; y < scans; y++) | ||
727 | { | ||
728 | if (cinfo.saw_Adobe_marker) | ||
729 | { | ||
730 | for (x = 0; x < w; x++) | ||
731 | { | ||
732 | /* According to libjpeg doc, Photoshop inverse the values of C, M, Y and K, */ | ||
733 | /* that is C is replaces by 255 - C, etc...*/ | ||
734 | /* See the comment below for the computation of RGB values from CMYK ones. */ | ||
735 | *ptr2 = | ||
736 | (0xff000000) | | ||
737 | ((ptr[0] * ptr[3] / 255) << 16) | | ||
738 | ((ptr[1] * ptr[3] / 255) << 8) | | ||
739 | ((ptr[2] * ptr[3] / 255)); | ||
740 | ptr += 4; | ||
741 | ptr2++; | ||
742 | } | ||
743 | } | ||
744 | else | ||
745 | { | ||
746 | for (x = 0; x < w; x++) | ||
747 | { | ||
748 | /* Conversion from CMYK to RGB is done in 2 steps: */ | ||
749 | /* CMYK => CMY => RGB (see http://www.easyrgb.com/index.php?X=MATH) */ | ||
750 | /* after computation, if C, M, Y and K are between 0 and 1, we have: */ | ||
751 | /* R = (1 - C) * (1 - K) * 255 */ | ||
752 | /* G = (1 - M) * (1 - K) * 255 */ | ||
753 | /* B = (1 - Y) * (1 - K) * 255 */ | ||
754 | /* libjpeg stores CMYK values between 0 and 255, */ | ||
755 | /* so we replace C by C * 255 / 255, etc... and we obtain: */ | ||
756 | /* R = (255 - C) * (255 - K) / 255 */ | ||
757 | /* G = (255 - M) * (255 - K) / 255 */ | ||
758 | /* B = (255 - Y) * (255 - K) / 255 */ | ||
759 | /* with C, M, Y and K between 0 and 255. */ | ||
760 | *ptr2 = | ||
761 | (0xff000000) | | ||
762 | (((255 - ptr[0]) * (255 - ptr[3]) / 255) << 16) | | ||
763 | (((255 - ptr[1]) * (255 - ptr[3]) / 255) << 8) | | ||
764 | (((255 - ptr[2]) * (255 - ptr[3]) / 255)); | ||
765 | ptr += 4; | ||
766 | ptr2++; | ||
767 | } | ||
768 | } | ||
769 | } | ||
770 | } | ||
771 | else | ||
772 | { | ||
773 | // if line # > region last line, break | ||
774 | if (l >= (ie->load_opts.region.y + ie->load_opts.region.h)) | ||
775 | { | ||
776 | line_done = EINA_TRUE; | ||
777 | /* if rotation flag is set , we have to rotate image */ | ||
778 | goto done; | ||
779 | /*jpeg_destroy_decompress(&cinfo); | ||
780 | _evas_jpeg_membuf_src_term(&cinfo); | ||
781 | *error = EVAS_LOAD_ERROR_NONE; | ||
782 | return EINA_FALSE;*/ | ||
783 | } | ||
784 | // els if scan block intersects region start or later | ||
785 | else if ((l + scans) > | ||
786 | (ie->load_opts.region.y)) | ||
787 | { | ||
788 | for (y = 0; y < scans; y++) | ||
789 | { | ||
790 | if (((y + l) >= ie->load_opts.region.y) && | ||
791 | ((y + l) < (ie->load_opts.region.y + ie->load_opts.region.h))) | ||
792 | { | ||
793 | ptr += ie->load_opts.region.x; | ||
794 | if (cinfo.saw_Adobe_marker) | ||
795 | { | ||
796 | for (x = 0; x < ie->load_opts.region.w; x++) | ||
797 | { | ||
798 | /* According to libjpeg doc, Photoshop inverse the values of C, M, Y and K, */ | ||
799 | /* that is C is replaces by 255 - C, etc...*/ | ||
800 | /* See the comment below for the computation of RGB values from CMYK ones. */ | ||
801 | *ptr2 = | ||
802 | (0xff000000) | | ||
803 | ((ptr[0] * ptr[3] / 255) << 16) | | ||
804 | ((ptr[1] * ptr[3] / 255) << 8) | | ||
805 | ((ptr[2] * ptr[3] / 255)); | ||
806 | ptr += 4; | ||
807 | ptr2++; | ||
808 | } | ||
809 | } | ||
810 | else | ||
811 | { | ||
812 | for (x = 0; x < ie->load_opts.region.w; x++) | ||
813 | { | ||
814 | /* Conversion from CMYK to RGB is done in 2 steps: */ | ||
815 | /* CMYK => CMY => RGB (see http://www.easyrgb.com/index.php?X=MATH) */ | ||
816 | /* after computation, if C, M, Y and K are between 0 and 1, we have: */ | ||
817 | /* R = (1 - C) * (1 - K) * 255 */ | ||
818 | /* G = (1 - M) * (1 - K) * 255 */ | ||
819 | /* B = (1 - Y) * (1 - K) * 255 */ | ||
820 | /* libjpeg stores CMYK values between 0 and 255, */ | ||
821 | /* so we replace C by C * 255 / 255, etc... and we obtain: */ | ||
822 | /* R = (255 - C) * (255 - K) / 255 */ | ||
823 | /* G = (255 - M) * (255 - K) / 255 */ | ||
824 | /* B = (255 - Y) * (255 - K) / 255 */ | ||
825 | /* with C, M, Y and K between 0 and 255. */ | ||
826 | *ptr2 = | ||
827 | (0xff000000) | | ||
828 | (((255 - ptr[0]) * (255 - ptr[3]) / 255) << 16) | | ||
829 | (((255 - ptr[1]) * (255 - ptr[3]) / 255) << 8) | | ||
830 | (((255 - ptr[2]) * (255 - ptr[3]) / 255)); | ||
831 | ptr += 4; | ||
832 | ptr2++; | ||
833 | } | ||
834 | } | ||
835 | ptr += (4 * (w - (ie->load_opts.region.x + ie->load_opts.region.w))); | ||
836 | } | ||
837 | else | ||
838 | ptr += (4 * w); | ||
839 | } | ||
840 | } | ||
841 | } | ||
842 | } | ||
843 | } | ||
844 | /* We handle then RGB with 3 components */ | ||
845 | else if (cinfo.output_components == 3) | ||
846 | { | ||
847 | /* | ||
848 | double t; | ||
849 | if (region) | ||
850 | { | ||
851 | // debug for now | ||
852 | printf("R| %p %5ix%5i %s: %5i %5i %5ix%5i - ", | ||
853 | ie, | ||
854 | ie->w, ie->h, | ||
855 | ie->file, | ||
856 | ie->load_opts.region.x, | ||
857 | ie->load_opts.region.y, | ||
858 | ie->load_opts.region.w, | ||
859 | ie->load_opts.region.h); | ||
860 | } | ||
861 | t = get_time(); | ||
862 | */ | ||
863 | for (i = 0; (int)i < cinfo.rec_outbuf_height; i++) | ||
864 | line[i] = data + (i * w * 3); | ||
865 | for (l = 0; l < h; l += cinfo.rec_outbuf_height) | ||
866 | { | ||
867 | jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); | ||
868 | scans = cinfo.rec_outbuf_height; | ||
869 | if ((h - l) < scans) scans = h - l; | ||
870 | ptr = data; | ||
871 | if (!region) | ||
872 | { | ||
873 | for (y = 0; y < scans; y++) | ||
874 | { | ||
875 | for (x = 0; x < w; x++) | ||
876 | { | ||
877 | *ptr2 = ARGB_JOIN(0xff, ptr[0], ptr[1], ptr[2]); | ||
878 | ptr += 3; | ||
879 | ptr2++; | ||
880 | } | ||
881 | } | ||
882 | } | ||
883 | else | ||
884 | { | ||
885 | // if line # > region last line, break | ||
886 | // but not return immediately for rotation job | ||
887 | if (l >= (ie->load_opts.region.y + ie->load_opts.region.h)) | ||
888 | { | ||
889 | line_done = EINA_TRUE; | ||
890 | /* if rotation flag is set , we have to rotate image */ | ||
891 | goto done; | ||
892 | } | ||
893 | // else if scan block intersects region start or later | ||
894 | else if ((l + scans) > | ||
895 | (ie->load_opts.region.y)) | ||
896 | { | ||
897 | for (y = 0; y < scans; y++) | ||
898 | { | ||
899 | if (((y + l) >= ie->load_opts.region.y) && | ||
900 | ((y + l) < (ie->load_opts.region.y + ie->load_opts.region.h))) | ||
901 | { | ||
902 | ptr += (3 * ie->load_opts.region.x); | ||
903 | for (x = 0; x < ie->load_opts.region.w; x++) | ||
904 | { | ||
905 | *ptr2 = ARGB_JOIN(0xff, ptr[0], ptr[1], ptr[2]); | ||
906 | ptr += 3; | ||
907 | ptr2++; | ||
908 | } | ||
909 | ptr += (3 * (w - (ie->load_opts.region.x + ie->load_opts.region.w))); | ||
910 | } | ||
911 | else | ||
912 | ptr += (3 * w); | ||
913 | } | ||
914 | } | ||
915 | } | ||
916 | } | ||
917 | /* | ||
918 | t = get_time() - t; | ||
919 | printf("%3.3f\n", t); | ||
920 | */ | ||
921 | } | ||
922 | /* We finally handle RGB with 1 component */ | ||
923 | else if (cinfo.output_components == 1) | ||
924 | { | ||
925 | for (i = 0; (int)i < cinfo.rec_outbuf_height; i++) | ||
926 | line[i] = data + (i * w); | ||
927 | for (l = 0; l < h; l += cinfo.rec_outbuf_height) | ||
928 | { | ||
929 | jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); | ||
930 | scans = cinfo.rec_outbuf_height; | ||
931 | if ((h - l) < scans) scans = h - l; | ||
932 | ptr = data; | ||
933 | if (!region) | ||
934 | { | ||
935 | for (y = 0; y < scans; y++) | ||
936 | { | ||
937 | for (x = 0; x < w; x++) | ||
938 | { | ||
939 | *ptr2 = ARGB_JOIN(0xff, ptr[0], ptr[0], ptr[0]); | ||
940 | ptr++; | ||
941 | ptr2++; | ||
942 | } | ||
943 | } | ||
944 | } | ||
945 | else | ||
946 | { | ||
947 | // if line # > region last line, break | ||
948 | if (l >= (ie->load_opts.region.y + ie->load_opts.region.h)) | ||
949 | { | ||
950 | line_done = EINA_TRUE; | ||
951 | /* if rotation flag is set , we have to rotate image */ | ||
952 | goto done; | ||
953 | /*jpeg_destroy_decompress(&cinfo); | ||
954 | _evas_jpeg_membuf_src_term(&cinfo); | ||
955 | *error = EVAS_LOAD_ERROR_NONE; | ||
956 | return EINA_TRUE;*/ | ||
957 | } | ||
958 | // els if scan block intersects region start or later | ||
959 | else if ((l + scans) > | ||
960 | (ie->load_opts.region.y)) | ||
961 | { | ||
962 | for (y = 0; y < scans; y++) | ||
963 | { | ||
964 | if (((y + l) >= ie->load_opts.region.y) && | ||
965 | ((y + l) < (ie->load_opts.region.y + ie->load_opts.region.h))) | ||
966 | { | ||
967 | ptr += ie->load_opts.region.x; | ||
968 | for (x = 0; x < ie->load_opts.region.w; x++) | ||
969 | { | ||
970 | *ptr2 = ARGB_JOIN(0xff, ptr[0], ptr[0], ptr[0]); | ||
971 | ptr++; | ||
972 | ptr2++; | ||
973 | } | ||
974 | ptr += w - (ie->load_opts.region.x + ie->load_opts.region.w); | ||
975 | } | ||
976 | else | ||
977 | ptr += w; | ||
978 | } | ||
979 | } | ||
980 | } | ||
981 | } | ||
982 | } | ||
983 | /* if rotation operation need, rotate it */ | ||
984 | done: | ||
985 | |||
986 | if (ie->flags.rotated) | ||
987 | { | ||
988 | DATA32 *data1, *data2, *to, *from; | ||
989 | int lx, ly, lw, lh, hw; | ||
990 | |||
991 | lw = ie->w; | ||
992 | lh = ie->h; | ||
993 | hw =lw * lh; | ||
994 | |||
995 | data1 = evas_cache_image_pixels(ie); | ||
996 | |||
997 | if (degree == 180) | ||
998 | { | ||
999 | DATA32 tmpd; | ||
1000 | |||
1001 | data2 = data1 + (lh * lw) -1; | ||
1002 | for (lx = (lw * lh) / 2; --lx >= 0;) | ||
1003 | { | ||
1004 | tmpd = *data1; | ||
1005 | *data1 = *data2; | ||
1006 | *data2 = tmpd; | ||
1007 | data1++; | ||
1008 | data2--; | ||
1009 | } | ||
1010 | } | ||
1011 | else | ||
1012 | { | ||
1013 | data2 = NULL; | ||
1014 | to = NULL; | ||
1015 | if (ptr_rotate) data2 = ptr_rotate; | ||
1016 | |||
1017 | if (degree == 90) | ||
1018 | { | ||
1019 | to = data1 + lw - 1; | ||
1020 | hw = -hw - 1; | ||
1021 | } | ||
1022 | else if (degree == 270) | ||
1023 | { | ||
1024 | to = data1 + hw - lw; | ||
1025 | lw = -lw; | ||
1026 | hw = hw + 1; | ||
1027 | } | ||
1028 | |||
1029 | if (to) | ||
1030 | { | ||
1031 | from = data2; | ||
1032 | for (lx = ie->w; --lx >= 0;) | ||
1033 | { | ||
1034 | for (ly =ie->h; --ly >= 0;) | ||
1035 | { | ||
1036 | *to = *from; | ||
1037 | from++; | ||
1038 | to += lw; | ||
1039 | } | ||
1040 | to += hw; | ||
1041 | } | ||
1042 | } | ||
1043 | if (ptr_rotate) | ||
1044 | { | ||
1045 | free(ptr_rotate); | ||
1046 | ptr_rotate = NULL; | ||
1047 | } | ||
1048 | } | ||
1049 | if (region) | ||
1050 | { | ||
1051 | ie->load_opts.region.x = load_region_x; | ||
1052 | ie->load_opts.region.y = load_region_y; | ||
1053 | ie->load_opts.region.w = load_region_w; | ||
1054 | ie->load_opts.region.h = load_region_h; | ||
1055 | } | ||
1056 | } | ||
1057 | |||
1058 | if (line_done) | ||
1059 | { | ||
1060 | jpeg_destroy_decompress(&cinfo); | ||
1061 | _evas_jpeg_membuf_src_term(&cinfo); | ||
1062 | *error = EVAS_LOAD_ERROR_NONE; | ||
1063 | return EINA_FALSE; | ||
1064 | } | ||
1065 | /* end data decoding */ | ||
1066 | jpeg_finish_decompress(&cinfo); | ||
1067 | jpeg_destroy_decompress(&cinfo); | ||
1068 | _evas_jpeg_membuf_src_term(&cinfo); | ||
1069 | *error = EVAS_LOAD_ERROR_NONE; | ||
1070 | return EINA_TRUE; | ||
1071 | } | ||
1072 | |||
1073 | #if 0 /* not used at the moment */ | ||
1074 | static Eina_Bool | ||
1075 | evas_image_load_file_data_jpeg_alpha_internal(Image_Entry *ie, FILE *f, int *error) | ||
1076 | { | ||
1077 | int w, h; | ||
1078 | struct jpeg_decompress_struct cinfo; | ||
1079 | struct _JPEG_error_mgr jerr; | ||
1080 | DATA8 *ptr, *line[16], *data; | ||
1081 | DATA32 *ptr2; | ||
1082 | int x, y, l, i, scans, prevy; | ||
1083 | |||
1084 | if (!f) | ||
1085 | { | ||
1086 | *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; | ||
1087 | return EINA_FALSE; | ||
1088 | } | ||
1089 | cinfo.err = jpeg_std_error(&(jerr.pub)); | ||
1090 | jerr.pub.error_exit = _JPEGFatalErrorHandler; | ||
1091 | jerr.pub.emit_message = _JPEGErrorHandler2; | ||
1092 | jerr.pub.output_message = _JPEGErrorHandler; | ||
1093 | if (setjmp(jerr.setjmp_buffer)) | ||
1094 | { | ||
1095 | jpeg_destroy_decompress(&cinfo); | ||
1096 | *error = EVAS_LOAD_ERROR_CORRUPT_FILE; | ||
1097 | return EINA_FALSE; | ||
1098 | } | ||
1099 | jpeg_create_decompress(&cinfo); | ||
1100 | jpeg_stdio_src(&cinfo, f); | ||
1101 | jpeg_read_header(&cinfo, TRUE); | ||
1102 | cinfo.do_fancy_upsampling = FALSE; | ||
1103 | cinfo.do_block_smoothing = FALSE; | ||
1104 | jpeg_start_decompress(&cinfo); | ||
1105 | |||
1106 | /* head decoding */ | ||
1107 | ie->w = w = cinfo.output_width; | ||
1108 | ie->h = h = cinfo.output_height; | ||
1109 | /* end head decoding */ | ||
1110 | /* data decoding */ | ||
1111 | if (cinfo.rec_outbuf_height > 16) | ||
1112 | { | ||
1113 | jpeg_destroy_decompress(&cinfo); | ||
1114 | *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; | ||
1115 | return EINA_FALSE;; | ||
1116 | } | ||
1117 | data = alloca(w * 16 * 3); | ||
1118 | if (!ie->flags.loaded) | ||
1119 | { | ||
1120 | jpeg_destroy_decompress(&cinfo); | ||
1121 | *error = EVAS_LOAD_ERROR_NONE; | ||
1122 | return EINA_TRUE; | ||
1123 | } | ||
1124 | ptr2 = evas_cache_image_pixels(ie); | ||
1125 | prevy = 0; | ||
1126 | if (cinfo.output_components == 3) | ||
1127 | { | ||
1128 | for (i = 0; i < cinfo.rec_outbuf_height; i++) | ||
1129 | line[i] = data + (i * w * 3); | ||
1130 | for (l = 0; l < h; l += cinfo.rec_outbuf_height) | ||
1131 | { | ||
1132 | jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); | ||
1133 | scans = cinfo.rec_outbuf_height; | ||
1134 | if ((h - l) < scans) scans = h - l; | ||
1135 | ptr = data; | ||
1136 | for (y = 0; y < scans; y++) | ||
1137 | { | ||
1138 | for (x = 0; x < w; x++) | ||
1139 | { | ||
1140 | *ptr2 = | ||
1141 | ((*ptr2) & 0x00ffffff) | | ||
1142 | (((ptr[0] + ptr[1] + ptr[2]) / 3) << 24); | ||
1143 | ptr += 3; | ||
1144 | ptr2++; | ||
1145 | } | ||
1146 | } | ||
1147 | } | ||
1148 | } | ||
1149 | else if (cinfo.output_components == 1) | ||
1150 | { | ||
1151 | for (i = 0; i < cinfo.rec_outbuf_height; i++) | ||
1152 | line[i] = data + (i * w); | ||
1153 | for (l = 0; l < h; l += cinfo.rec_outbuf_height) | ||
1154 | { | ||
1155 | jpeg_read_scanlines(&cinfo, line, cinfo.rec_outbuf_height); | ||
1156 | scans = cinfo.rec_outbuf_height; | ||
1157 | if ((h - l) < scans) scans = h - l; | ||
1158 | ptr = data; | ||
1159 | for (y = 0; y < scans; y++) | ||
1160 | { | ||
1161 | for (x = 0; x < w; x++) | ||
1162 | { | ||
1163 | *ptr2 = | ||
1164 | ((*ptr2) & 0x00ffffff) | | ||
1165 | ((ptr[0]) << 24); | ||
1166 | ptr++; | ||
1167 | ptr2++; | ||
1168 | } | ||
1169 | } | ||
1170 | } | ||
1171 | } | ||
1172 | /* end data decoding */ | ||
1173 | jpeg_finish_decompress(&cinfo); | ||
1174 | jpeg_destroy_decompress(&cinfo); | ||
1175 | *error = EVAS_LOAD_ERROR_NONE; | ||
1176 | return EINA_TRUE; | ||
1177 | } | ||
1178 | #endif | ||
1179 | |||
1180 | static Eina_Bool | ||
1181 | evas_image_load_file_head_jpeg(Image_Entry *ie, | ||
1182 | const char *file, const char *key __UNUSED__, | ||
1183 | int *error) | ||
1184 | { | ||
1185 | Eina_File *f; | ||
1186 | void *map; | ||
1187 | Eina_Bool val = EINA_FALSE; | ||
1188 | |||
1189 | f = eina_file_open(file, EINA_FALSE); | ||
1190 | if (!f) | ||
1191 | { | ||
1192 | *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; | ||
1193 | return EINA_FALSE; | ||
1194 | } | ||
1195 | map = eina_file_map_all(f, EINA_FILE_WILLNEED); | ||
1196 | if (!map) | ||
1197 | { | ||
1198 | *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; | ||
1199 | goto on_error; | ||
1200 | } | ||
1201 | |||
1202 | val = evas_image_load_file_head_jpeg_internal(ie, | ||
1203 | map, eina_file_size_get(f), | ||
1204 | error); | ||
1205 | |||
1206 | eina_file_map_free(f, map); | ||
1207 | |||
1208 | on_error: | ||
1209 | eina_file_close(f); | ||
1210 | return val; | ||
1211 | } | ||
1212 | |||
1213 | static Eina_Bool | ||
1214 | evas_image_load_file_data_jpeg(Image_Entry *ie, | ||
1215 | const char *file, const char *key __UNUSED__, | ||
1216 | int *error) | ||
1217 | { | ||
1218 | Eina_File *f; | ||
1219 | void *map; | ||
1220 | Eina_Bool val = EINA_FALSE; | ||
1221 | |||
1222 | f = eina_file_open(file, EINA_FALSE); | ||
1223 | if (!f) | ||
1224 | { | ||
1225 | *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; | ||
1226 | return EINA_FALSE; | ||
1227 | } | ||
1228 | map = eina_file_map_all(f, EINA_FILE_WILLNEED); | ||
1229 | if (!map) | ||
1230 | { | ||
1231 | *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST; | ||
1232 | goto on_error; | ||
1233 | } | ||
1234 | |||
1235 | val = evas_image_load_file_data_jpeg_internal(ie, | ||
1236 | map, eina_file_size_get(f), | ||
1237 | error); | ||
1238 | |||
1239 | eina_file_map_free(f, map); | ||
1240 | |||
1241 | on_error: | ||
1242 | eina_file_close(f); | ||
1243 | return val; | ||
1244 | } | ||
1245 | |||
1246 | static int | ||
1247 | module_open(Evas_Module *em) | ||
1248 | { | ||
1249 | if (!em) return 0; | ||
1250 | em->functions = (void *)(&evas_image_load_jpeg_func); | ||
1251 | return 1; | ||
1252 | } | ||
1253 | |||
1254 | static void | ||
1255 | module_close(Evas_Module *em __UNUSED__) | ||
1256 | { | ||
1257 | } | ||
1258 | |||
1259 | static Evas_Module_Api evas_modapi = | ||
1260 | { | ||
1261 | EVAS_MODULE_API_VERSION, | ||
1262 | "jpeg", | ||
1263 | "none", | ||
1264 | { | ||
1265 | module_open, | ||
1266 | module_close | ||
1267 | } | ||
1268 | }; | ||
1269 | |||
1270 | EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, jpeg); | ||
1271 | |||
1272 | #ifndef EVAS_STATIC_BUILD_JPEG | ||
1273 | EVAS_EINA_MODULE_DEFINE(image_loader, jpeg); | ||
1274 | #endif | ||
1275 | |||