aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/modules/loaders/psd
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-04 18:41:13 +1000
committerDavid Walter Seikel2012-01-04 18:41:13 +1000
commitdd7595a3475407a7fa96a97393bae8c5220e8762 (patch)
treee341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/modules/loaders/psd
parentAdd the skeleton. (diff)
downloadSledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to '')
-rw-r--r--libraries/evas/src/modules/loaders/psd/Makefile.am33
-rw-r--r--libraries/evas/src/modules/loaders/psd/Makefile.in758
-rw-r--r--libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c976
3 files changed, 1767 insertions, 0 deletions
diff --git a/libraries/evas/src/modules/loaders/psd/Makefile.am b/libraries/evas/src/modules/loaders/psd/Makefile.am
new file mode 100644
index 0000000..8b06348
--- /dev/null
+++ b/libraries/evas/src/modules/loaders/psd/Makefile.am
@@ -0,0 +1,33 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I. \
6-I$(top_srcdir)/src/lib \
7-I$(top_srcdir)/src/lib/include \
8@FREETYPE_CFLAGS@ \
9@PIXMAN_CFLAGS@ \
10@EINA_CFLAGS@ \
11@EVIL_CFLAGS@ \
12@WIN32_CPPFLAGS@
13
14if BUILD_LOADER_PSD
15if !EVAS_STATIC_BUILD_PSD
16
17pkgdir = $(libdir)/evas/modules/loaders/psd/$(MODULE_ARCH)
18pkg_LTLIBRARIES = module.la
19
20module_la_SOURCES = evas_image_load_psd.c
21
22module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la
23module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
24module_la_LIBTOOLFLAGS = --tag=disable-static
25
26else
27
28noinst_LTLIBRARIES = libevas_loader_psd.la
29libevas_loader_psd_la_SOURCES = evas_image_load_psd.c
30libevas_loader_psd_la_LIBADD =
31
32endif
33endif
diff --git a/libraries/evas/src/modules/loaders/psd/Makefile.in b/libraries/evas/src/modules/loaders/psd/Makefile.in
new file mode 100644
index 0000000..98d340a
--- /dev/null
+++ b/libraries/evas/src/modules/loaders/psd/Makefile.in
@@ -0,0 +1,758 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/modules/loaders/psd
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__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
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
60am__vpath_adj = case $$p in \
61 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
62 *) f=$$p;; \
63 esac;
64am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
65am__install_max = 40
66am__nobase_strip_setup = \
67 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
68am__nobase_strip = \
69 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
70am__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] }'
77am__base_list = \
78 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
79 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
80am__installdirs = "$(DESTDIR)$(pkgdir)"
81LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkg_LTLIBRARIES)
82libevas_loader_psd_la_DEPENDENCIES =
83am__libevas_loader_psd_la_SOURCES_DIST = evas_image_load_psd.c
84@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_TRUE@am_libevas_loader_psd_la_OBJECTS = evas_image_load_psd.lo
85libevas_loader_psd_la_OBJECTS = $(am_libevas_loader_psd_la_OBJECTS)
86AM_V_lt = $(am__v_lt_$(V))
87am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
88am__v_lt_0 = --silent
89@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_TRUE@am_libevas_loader_psd_la_rpath =
90@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@module_la_DEPENDENCIES = $(top_builddir)/src/lib/libevas.la
91am__module_la_SOURCES_DIST = evas_image_load_psd.c
92@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@am_module_la_OBJECTS = module_la-evas_image_load_psd.lo
93module_la_OBJECTS = $(am_module_la_OBJECTS)
94module_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_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@am_module_la_rpath = \
98@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@ -rpath \
99@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@ $(pkgdir)
100DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
101depcomp = $(SHELL) $(top_srcdir)/depcomp
102am__depfiles_maybe = depfiles
103am__mv = mv -f
104COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
105 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
106LTCOMPILE = $(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)
110AM_V_CC = $(am__v_CC_$(V))
111am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
112am__v_CC_0 = @echo " CC " $@;
113AM_V_at = $(am__v_at_$(V))
114am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
115am__v_at_0 = @
116CCLD = $(CC)
117LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
118 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
119 $(AM_LDFLAGS) $(LDFLAGS) -o $@
120AM_V_CCLD = $(am__v_CCLD_$(V))
121am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
122am__v_CCLD_0 = @echo " CCLD " $@;
123AM_V_GEN = $(am__v_GEN_$(V))
124am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
125am__v_GEN_0 = @echo " GEN " $@;
126SOURCES = $(libevas_loader_psd_la_SOURCES) $(module_la_SOURCES)
127DIST_SOURCES = $(am__libevas_loader_psd_la_SOURCES_DIST) \
128 $(am__module_la_SOURCES_DIST)
129ETAGS = etags
130CTAGS = ctags
131DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
132ACLOCAL = @ACLOCAL@
133ALLOCA = @ALLOCA@
134AMTAR = @AMTAR@
135AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
136AR = @AR@
137AS = @AS@
138AUTOCONF = @AUTOCONF@
139AUTOHEADER = @AUTOHEADER@
140AUTOMAKE = @AUTOMAKE@
141AWK = @AWK@
142CC = @CC@
143CCDEPMODE = @CCDEPMODE@
144CFLAGS = @CFLAGS@
145CHECK_CFLAGS = @CHECK_CFLAGS@
146CHECK_LIBS = @CHECK_LIBS@
147CPP = @CPP@
148CPPFLAGS = @CPPFLAGS@
149CXX = @CXX@
150CXXCPP = @CXXCPP@
151CXXDEPMODE = @CXXDEPMODE@
152CXXFLAGS = @CXXFLAGS@
153CYGPATH_W = @CYGPATH_W@
154DEFS = @DEFS@
155DEPDIR = @DEPDIR@
156DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
157DIRECTFB_LIBS = @DIRECTFB_LIBS@
158DLLTOOL = @DLLTOOL@
159DSYMUTIL = @DSYMUTIL@
160DUMPBIN = @DUMPBIN@
161ECHO_C = @ECHO_C@
162ECHO_N = @ECHO_N@
163ECHO_T = @ECHO_T@
164ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
165ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
166EDB_CFLAGS = @EDB_CFLAGS@
167EDB_LIBS = @EDB_LIBS@
168EDJE_CFLAGS = @EDJE_CFLAGS@
169EDJE_LIBS = @EDJE_LIBS@
170EET_CFLAGS = @EET_CFLAGS@
171EET_LIBS = @EET_LIBS@
172EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
173EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
174EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
175EGREP = @EGREP@
176EINA_CFLAGS = @EINA_CFLAGS@
177EINA_LIBS = @EINA_LIBS@
178EVAS_CFLAGS = @EVAS_CFLAGS@
179EVAS_LIBS = @EVAS_LIBS@
180EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
181EVIL_CFLAGS = @EVIL_CFLAGS@
182EVIL_LIBS = @EVIL_LIBS@
183EXEEXT = @EXEEXT@
184FGREP = @FGREP@
185FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
186FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
187FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
188FREETYPE_LIBS = @FREETYPE_LIBS@
189FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
190FRIBIDI_LIBS = @FRIBIDI_LIBS@
191GL_EET_CFLAGS = @GL_EET_CFLAGS@
192GL_EET_LIBS = @GL_EET_LIBS@
193GREP = @GREP@
194HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
195HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
196INSTALL = @INSTALL@
197INSTALL_DATA = @INSTALL_DATA@
198INSTALL_PROGRAM = @INSTALL_PROGRAM@
199INSTALL_SCRIPT = @INSTALL_SCRIPT@
200INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
201LD = @LD@
202LDFLAGS = @LDFLAGS@
203LIBOBJS = @LIBOBJS@
204LIBS = @LIBS@
205LIBTOOL = @LIBTOOL@
206LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
207LINEBREAK_LIBS = @LINEBREAK_LIBS@
208LIPO = @LIPO@
209LN_S = @LN_S@
210LTLIBOBJS = @LTLIBOBJS@
211MAKEINFO = @MAKEINFO@
212MKDIR_P = @MKDIR_P@
213MODULE_ARCH = @MODULE_ARCH@
214NM = @NM@
215NMEDIT = @NMEDIT@
216OBJC = @OBJC@
217OBJCDEPMODE = @OBJCDEPMODE@
218OBJCFLAGS = @OBJCFLAGS@
219OBJDUMP = @OBJDUMP@
220OBJEXT = @OBJEXT@
221OTOOL = @OTOOL@
222OTOOL64 = @OTOOL64@
223PACKAGE = @PACKAGE@
224PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
225PACKAGE_NAME = @PACKAGE_NAME@
226PACKAGE_STRING = @PACKAGE_STRING@
227PACKAGE_TARNAME = @PACKAGE_TARNAME@
228PACKAGE_URL = @PACKAGE_URL@
229PACKAGE_VERSION = @PACKAGE_VERSION@
230PATH_SEPARATOR = @PATH_SEPARATOR@
231PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
232PIXMAN_LIBS = @PIXMAN_LIBS@
233PKG_CONFIG = @PKG_CONFIG@
234PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
235PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
236PNG_CFLAGS = @PNG_CFLAGS@
237PNG_LIBS = @PNG_LIBS@
238RANLIB = @RANLIB@
239SDL_CFLAGS = @SDL_CFLAGS@
240SDL_LIBS = @SDL_LIBS@
241SED = @SED@
242SET_MAKE = @SET_MAKE@
243SHELL = @SHELL@
244SHM_OPEN_LINK = @SHM_OPEN_LINK@
245STRIP = @STRIP@
246SVG_CFLAGS = @SVG_CFLAGS@
247SVG_LIBS = @SVG_LIBS@
248VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
249VALGRIND_LIBS = @VALGRIND_LIBS@
250VERSION = @VERSION@
251VMAJ = @VMAJ@
252WIN32_CFLAGS = @WIN32_CFLAGS@
253WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
254XCB_CFLAGS = @XCB_CFLAGS@
255XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
256XCB_GL_LIBS = @XCB_GL_LIBS@
257XCB_LIBS = @XCB_LIBS@
258XEXT_CFLAGS = @XEXT_CFLAGS@
259XEXT_LIBS = @XEXT_LIBS@
260XMKMF = @XMKMF@
261X_CFLAGS = @X_CFLAGS@
262X_EXTRA_LIBS = @X_EXTRA_LIBS@
263X_LIBS = @X_LIBS@
264X_PRE_LIBS = @X_PRE_LIBS@
265abs_builddir = @abs_builddir@
266abs_srcdir = @abs_srcdir@
267abs_top_builddir = @abs_top_builddir@
268abs_top_srcdir = @abs_top_srcdir@
269ac_ct_CC = @ac_ct_CC@
270ac_ct_CXX = @ac_ct_CXX@
271ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
272ac_ct_OBJC = @ac_ct_OBJC@
273altivec_cflags = @altivec_cflags@
274am__include = @am__include@
275am__leading_dot = @am__leading_dot@
276am__quote = @am__quote@
277am__tar = @am__tar@
278am__untar = @am__untar@
279bindir = @bindir@
280build = @build@
281build_alias = @build_alias@
282build_cpu = @build_cpu@
283build_os = @build_os@
284build_vendor = @build_vendor@
285builddir = @builddir@
286datadir = @datadir@
287datarootdir = @datarootdir@
288dlopen_libs = @dlopen_libs@
289docdir = @docdir@
290dvidir = @dvidir@
291edje_cc = @edje_cc@
292efl_doxygen = @efl_doxygen@
293efl_have_doxygen = @efl_have_doxygen@
294evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
295evas_engine_buffer_libs = @evas_engine_buffer_libs@
296evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
297evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
298evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
299evas_engine_directfb_libs = @evas_engine_directfb_libs@
300evas_engine_fb_cflags = @evas_engine_fb_cflags@
301evas_engine_fb_libs = @evas_engine_fb_libs@
302evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
303evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
304evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
305evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
306evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
307evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
308evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
309evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
310evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
311evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
312evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
313evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
314evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
315evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
316evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
317evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
318evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
319evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
320evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
321evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
322evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
323evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
324evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
325evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
326evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
327evas_engine_software_sdl_cflags = @evas_engine_software_sdl_cflags@
328evas_engine_software_sdl_libs = @evas_engine_software_sdl_libs@
329evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
330evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
331evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
332evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
333evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
334evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
335evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
336evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
337evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
338evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
339evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
340evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
341evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
342evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
343evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
344evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
345evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
346evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
347evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
348evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
349evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
350evas_image_loader_png_libs = @evas_image_loader_png_libs@
351evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
352evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
353evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
354evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
355evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
356evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
357evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
358evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
359evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
360evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
361evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
362evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
363exec_prefix = @exec_prefix@
364have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
365have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
366have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
367have_evas_engine_software_x11 = @have_evas_engine_software_x11@
368have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
369have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
370have_lcov = @have_lcov@
371host = @host@
372host_alias = @host_alias@
373host_cpu = @host_cpu@
374host_os = @host_os@
375host_vendor = @host_vendor@
376htmldir = @htmldir@
377includedir = @includedir@
378infodir = @infodir@
379install_sh = @install_sh@
380libdir = @libdir@
381libexecdir = @libexecdir@
382localedir = @localedir@
383localstatedir = @localstatedir@
384lt_ECHO = @lt_ECHO@
385lt_enable_auto_import = @lt_enable_auto_import@
386mandir = @mandir@
387mkdir_p = @mkdir_p@
388oldincludedir = @oldincludedir@
389pdfdir = @pdfdir@
390pkgconfig_requires_private = @pkgconfig_requires_private@
391prefix = @prefix@
392program_transform_name = @program_transform_name@
393psdir = @psdir@
394pthread_cflags = @pthread_cflags@
395pthread_libs = @pthread_libs@
396release_info = @release_info@
397requirement_evas = @requirement_evas@
398sbindir = @sbindir@
399sharedstatedir = @sharedstatedir@
400srcdir = @srcdir@
401sysconfdir = @sysconfdir@
402target_alias = @target_alias@
403top_build_prefix = @top_build_prefix@
404top_builddir = @top_builddir@
405top_srcdir = @top_srcdir@
406version_info = @version_info@
407MAINTAINERCLEANFILES = Makefile.in
408AM_CPPFLAGS = \
409-I. \
410-I$(top_srcdir)/src/lib \
411-I$(top_srcdir)/src/lib/include \
412@FREETYPE_CFLAGS@ \
413@PIXMAN_CFLAGS@ \
414@EINA_CFLAGS@ \
415@EVIL_CFLAGS@ \
416@WIN32_CPPFLAGS@
417
418@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@pkgdir = $(libdir)/evas/modules/loaders/psd/$(MODULE_ARCH)
419@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@pkg_LTLIBRARIES = module.la
420@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@module_la_SOURCES = evas_image_load_psd.c
421@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la
422@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
423@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_FALSE@module_la_LIBTOOLFLAGS = --tag=disable-static
424@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_TRUE@noinst_LTLIBRARIES = libevas_loader_psd.la
425@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_TRUE@libevas_loader_psd_la_SOURCES = evas_image_load_psd.c
426@BUILD_LOADER_PSD_TRUE@@EVAS_STATIC_BUILD_PSD_TRUE@libevas_loader_psd_la_LIBADD =
427all: all-am
428
429.SUFFIXES:
430.SUFFIXES: .c .lo .o .obj
431$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
432 @for dep in $?; do \
433 case '$(am__configure_deps)' in \
434 *$$dep*) \
435 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
436 && { if test -f $@; then exit 0; else break; fi; }; \
437 exit 1;; \
438 esac; \
439 done; \
440 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/loaders/psd/Makefile'; \
441 $(am__cd) $(top_srcdir) && \
442 $(AUTOMAKE) --gnu src/modules/loaders/psd/Makefile
443.PRECIOUS: Makefile
444Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
445 @case '$?' in \
446 *config.status*) \
447 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
448 *) \
449 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
450 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
451 esac;
452
453$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
454 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
455
456$(top_srcdir)/configure: $(am__configure_deps)
457 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
458$(ACLOCAL_M4): $(am__aclocal_m4_deps)
459 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
460$(am__aclocal_m4_deps):
461
462clean-noinstLTLIBRARIES:
463 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
464 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
465 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
466 test "$$dir" != "$$p" || dir=.; \
467 echo "rm -f \"$${dir}/so_locations\""; \
468 rm -f "$${dir}/so_locations"; \
469 done
470install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES)
471 @$(NORMAL_INSTALL)
472 test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)"
473 @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \
474 list2=; for p in $$list; do \
475 if test -f $$p; then \
476 list2="$$list2 $$p"; \
477 else :; fi; \
478 done; \
479 test -z "$$list2" || { \
480 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \
481 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \
482 }
483
484uninstall-pkgLTLIBRARIES:
485 @$(NORMAL_UNINSTALL)
486 @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \
487 for p in $$list; do \
488 $(am__strip_dir) \
489 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \
490 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \
491 done
492
493clean-pkgLTLIBRARIES:
494 -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES)
495 @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \
496 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
497 test "$$dir" != "$$p" || dir=.; \
498 echo "rm -f \"$${dir}/so_locations\""; \
499 rm -f "$${dir}/so_locations"; \
500 done
501libevas_loader_psd.la: $(libevas_loader_psd_la_OBJECTS) $(libevas_loader_psd_la_DEPENDENCIES)
502 $(AM_V_CCLD)$(LINK) $(am_libevas_loader_psd_la_rpath) $(libevas_loader_psd_la_OBJECTS) $(libevas_loader_psd_la_LIBADD) $(LIBS)
503module.la: $(module_la_OBJECTS) $(module_la_DEPENDENCIES)
504 $(AM_V_CCLD)$(module_la_LINK) $(am_module_la_rpath) $(module_la_OBJECTS) $(module_la_LIBADD) $(LIBS)
505
506mostlyclean-compile:
507 -rm -f *.$(OBJEXT)
508
509distclean-compile:
510 -rm -f *.tab.c
511
512@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load_psd.Plo@am__quote@
513@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/module_la-evas_image_load_psd.Plo@am__quote@
514
515.c.o:
516@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
517@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
518@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
519@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
520@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
521@am__fastdepCC_FALSE@ $(COMPILE) -c $<
522
523.c.obj:
524@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
525@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
526@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
527@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
528@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
529@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
530
531.c.lo:
532@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
533@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
534@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
535@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
536@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
537@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
538
539module_la-evas_image_load_psd.lo: evas_image_load_psd.c
540@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT module_la-evas_image_load_psd.lo -MD -MP -MF $(DEPDIR)/module_la-evas_image_load_psd.Tpo -c -o module_la-evas_image_load_psd.lo `test -f 'evas_image_load_psd.c' || echo '$(srcdir)/'`evas_image_load_psd.c
541@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/module_la-evas_image_load_psd.Tpo $(DEPDIR)/module_la-evas_image_load_psd.Plo
542@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
543@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='evas_image_load_psd.c' object='module_la-evas_image_load_psd.lo' libtool=yes @AMDEPBACKSLASH@
544@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
545@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(module_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o module_la-evas_image_load_psd.lo `test -f 'evas_image_load_psd.c' || echo '$(srcdir)/'`evas_image_load_psd.c
546
547mostlyclean-libtool:
548 -rm -f *.lo
549
550clean-libtool:
551 -rm -rf .libs _libs
552
553ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
554 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
555 unique=`for i in $$list; do \
556 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
557 done | \
558 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
559 END { if (nonempty) { for (i in files) print i; }; }'`; \
560 mkid -fID $$unique
561tags: TAGS
562
563TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
564 $(TAGS_FILES) $(LISP)
565 set x; \
566 here=`pwd`; \
567 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
568 unique=`for i in $$list; do \
569 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
570 done | \
571 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
572 END { if (nonempty) { for (i in files) print i; }; }'`; \
573 shift; \
574 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
575 test -n "$$unique" || unique=$$empty_fix; \
576 if test $$# -gt 0; then \
577 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
578 "$$@" $$unique; \
579 else \
580 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
581 $$unique; \
582 fi; \
583 fi
584ctags: CTAGS
585CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
586 $(TAGS_FILES) $(LISP)
587 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
588 unique=`for i in $$list; do \
589 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
590 done | \
591 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
592 END { if (nonempty) { for (i in files) print i; }; }'`; \
593 test -z "$(CTAGS_ARGS)$$unique" \
594 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
595 $$unique
596
597GTAGS:
598 here=`$(am__cd) $(top_builddir) && pwd` \
599 && $(am__cd) $(top_srcdir) \
600 && gtags -i $(GTAGS_ARGS) "$$here"
601
602distclean-tags:
603 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
604
605distdir: $(DISTFILES)
606 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
607 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
608 list='$(DISTFILES)'; \
609 dist_files=`for file in $$list; do echo $$file; done | \
610 sed -e "s|^$$srcdirstrip/||;t" \
611 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
612 case $$dist_files in \
613 */*) $(MKDIR_P) `echo "$$dist_files" | \
614 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
615 sort -u` ;; \
616 esac; \
617 for file in $$dist_files; do \
618 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
619 if test -d $$d/$$file; then \
620 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
621 if test -d "$(distdir)/$$file"; then \
622 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
623 fi; \
624 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
625 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
626 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
627 fi; \
628 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
629 else \
630 test -f "$(distdir)/$$file" \
631 || cp -p $$d/$$file "$(distdir)/$$file" \
632 || exit 1; \
633 fi; \
634 done
635check-am: all-am
636check: check-am
637all-am: Makefile $(LTLIBRARIES)
638installdirs:
639 for dir in "$(DESTDIR)$(pkgdir)"; do \
640 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
641 done
642install: install-am
643install-exec: install-exec-am
644install-data: install-data-am
645uninstall: uninstall-am
646
647install-am: all-am
648 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
649
650installcheck: installcheck-am
651install-strip:
652 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
653 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
654 `test -z '$(STRIP)' || \
655 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
656mostlyclean-generic:
657
658clean-generic:
659
660distclean-generic:
661 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
662 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
663
664maintainer-clean-generic:
665 @echo "This command is intended for maintainers to use"
666 @echo "it deletes files that may require special tools to rebuild."
667 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
668clean: clean-am
669
670clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
671 clean-pkgLTLIBRARIES mostlyclean-am
672
673distclean: distclean-am
674 -rm -rf ./$(DEPDIR)
675 -rm -f Makefile
676distclean-am: clean-am distclean-compile distclean-generic \
677 distclean-tags
678
679dvi: dvi-am
680
681dvi-am:
682
683html: html-am
684
685html-am:
686
687info: info-am
688
689info-am:
690
691install-data-am: install-pkgLTLIBRARIES
692
693install-dvi: install-dvi-am
694
695install-dvi-am:
696
697install-exec-am:
698
699install-html: install-html-am
700
701install-html-am:
702
703install-info: install-info-am
704
705install-info-am:
706
707install-man:
708
709install-pdf: install-pdf-am
710
711install-pdf-am:
712
713install-ps: install-ps-am
714
715install-ps-am:
716
717installcheck-am:
718
719maintainer-clean: maintainer-clean-am
720 -rm -rf ./$(DEPDIR)
721 -rm -f Makefile
722maintainer-clean-am: distclean-am maintainer-clean-generic
723
724mostlyclean: mostlyclean-am
725
726mostlyclean-am: mostlyclean-compile mostlyclean-generic \
727 mostlyclean-libtool
728
729pdf: pdf-am
730
731pdf-am:
732
733ps: ps-am
734
735ps-am:
736
737uninstall-am: uninstall-pkgLTLIBRARIES
738
739.MAKE: install-am install-strip
740
741.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
742 clean-libtool clean-noinstLTLIBRARIES clean-pkgLTLIBRARIES \
743 ctags distclean distclean-compile distclean-generic \
744 distclean-libtool distclean-tags distdir dvi dvi-am html \
745 html-am info info-am install install-am install-data \
746 install-data-am install-dvi install-dvi-am install-exec \
747 install-exec-am install-html install-html-am install-info \
748 install-info-am install-man install-pdf install-pdf-am \
749 install-pkgLTLIBRARIES install-ps install-ps-am install-strip \
750 installcheck installcheck-am installdirs maintainer-clean \
751 maintainer-clean-generic mostlyclean mostlyclean-compile \
752 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
753 tags uninstall uninstall-am uninstall-pkgLTLIBRARIES
754
755
756# Tell versions [3.59,3.63) of GNU make to not export all variables.
757# Otherwise a system limit (for SysV at least) may be exceeded.
758.NOEXPORT:
diff --git a/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c b/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c
new file mode 100644
index 0000000..5a85e17
--- /dev/null
+++ b/libraries/evas/src/modules/loaders/psd/evas_image_load_psd.c
@@ -0,0 +1,976 @@
1#define _XOPEN_SOURCE
2
3#ifdef HAVE_CONFIG_H
4# include <config.h>
5#endif
6
7#include <stdlib.h>
8#include <stdio.h>
9#include <string.h>
10#include <errno.h>
11
12#include <math.h>
13#include <sys/types.h>
14#include <sys/stat.h>
15#include <fcntl.h>
16
17#ifdef HAVE_NETINET_IN_H
18# include <netinet/in.h>
19#endif
20
21#ifdef HAVE_UNISTD_H
22# include <unistd.h>
23#endif
24
25#ifdef HAVE_EVIL
26# include <Evil.h>
27#endif
28
29#include "evas_common.h"
30#include "evas_private.h"
31
32typedef struct _PSD_Header PSD_Header;
33
34typedef enum _PSD_Mode
35 {
36 PSD_GREYSCALE = 1,
37 PSD_INDEXED = 2,
38 PSD_RGB = 3,
39 PSD_CMYK = 4
40 } PSD_Mode;
41
42struct _PSD_Header
43{
44 unsigned char signature[4];
45 unsigned short version;
46 unsigned char reserved[9];
47 unsigned short channels;
48 unsigned int height;
49 unsigned int width;
50 unsigned short depth;
51
52 unsigned short channel_num;
53
54 PSD_Mode mode;
55};
56
57enum {
58 READ_COMPRESSED_SUCCESS,
59 READ_COMPRESSED_ERROR_FILE_CORRUPT,
60 READ_COMPRESSED_ERROR_FILE_READ_ERROR
61};
62
63static Eina_Bool get_compressed_channels_length(PSD_Header *Head,
64 FILE *file,
65 unsigned short *rle_table,
66 unsigned int *chanlen);
67
68static int
69read_ushort(FILE *file, unsigned short *ret)
70{
71 unsigned char b[2];
72 if (fread(b, sizeof(unsigned char), 2, file) != 2) return 0;
73 // FIXME: need to check order
74 *ret = (b[0] << 8) | b[1];
75 return 1;
76}
77
78static int
79read_uint(FILE *file, unsigned int *ret)
80{
81 unsigned char b[4];
82 if (fread(b, sizeof(unsigned char), 4, file) != 4) return 0;
83 // FIXME: need to check order
84 *ret = ARGB_JOIN(b[0], b[1], b[2], b[3]);
85 return 1;
86}
87
88// Internal function used to get the Psd header from the current file.
89Eina_Bool
90psd_get_header(PSD_Header *header, FILE * file)
91{
92 unsigned short tmp;
93
94#define CHECK_RET(Call, Value) \
95 if (Call != Value) return EINA_FALSE;
96
97 CHECK_RET(fread(header->signature, sizeof (unsigned char), 4, file), 4);
98 CHECK_RET(read_ushort(file, &header->version), 1);
99 CHECK_RET(fread(header->reserved, sizeof (unsigned char), 6, file), 6);
100 CHECK_RET(read_ushort(file, &header->channels), 1);
101 CHECK_RET(read_uint(file, &header->height), 1);
102 CHECK_RET(read_uint(file, &header->width), 1);
103 CHECK_RET(read_ushort(file, &header->depth), 1);
104
105 CHECK_RET(read_ushort(file, &tmp), 1);
106 header->mode = tmp;
107
108#undef CHECK_RET
109
110 /* fprintf(stderr, "<<<<<<<<<<<\nsignature : %c%c%c%c\n", */
111 /* header->signature[0], */
112 /* header->signature[1], */
113 /* header->signature[2], */
114 /* header->signature[3]); */
115 /* fprintf(stderr, "version : %i\n", header->version); */
116 /* fprintf(stderr, "channels : %i\n", header->channels); */
117 /* fprintf(stderr, "width x height : %dx%d\n", header->width, header->height); */
118 /* fprintf(stderr, "depth : %i\n", header->depth); */
119 /* fprintf(stderr, "mode : %i\n>>>>>>>>>>>>\n", header->mode); */
120
121 return EINA_TRUE;
122}
123
124
125// Internal function used to check if the HEADER is a valid Psd header.
126Eina_Bool
127is_psd(PSD_Header *header)
128{
129 if (strncmp((char*)header->signature, "8BPS", 4))
130 return EINA_FALSE;
131 if (header->version != 1)
132 return EINA_FALSE;
133 if (header->channels < 1 || header->channels > 24)
134 return EINA_FALSE;
135 if (header->height < 1 || header->width < 1)
136 return EINA_FALSE;
137 if (header->depth != 1 && header->depth != 8 && header->depth != 16)
138 return EINA_FALSE;
139
140 return EINA_TRUE;
141}
142
143static Eina_Bool
144evas_image_load_file_head_psd(Image_Entry *ie, const char *FileName,
145 const char *key __UNUSED__, int *error)
146{
147 FILE *f;
148 PSD_Header header;
149 Eina_Bool correct;
150
151 *error = EVAS_LOAD_ERROR_NONE;
152
153 f = fopen(FileName, "rb");
154 if (f == NULL)
155 {
156 *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
157 return EINA_FALSE;
158 }
159 correct = psd_get_header(&header, f);
160 fclose(f);
161
162 if (!correct || !is_psd(&header))
163 {
164 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
165 return EINA_FALSE;
166 }
167
168 ie->w = header.width;
169 ie->h = header.height;
170 if (header.channels == 3) ie->flags.alpha = 0;
171 else ie->flags.alpha = 1;
172
173 return EINA_TRUE;
174}
175
176static unsigned int
177read_compressed_channel(FILE* file,
178 const unsigned int channel_length __UNUSED__,
179 unsigned int size,
180 unsigned char* channel)
181{
182 // FIXME: what does channel_length means, and why is it not used
183 unsigned int i;
184 char headbyte, c;
185
186#define CHECK_RET(Call, Value) \
187 if (Call != Value) return READ_COMPRESSED_ERROR_FILE_READ_ERROR;
188
189 for (i = 0; i < size; )
190 {
191 CHECK_RET(fread(&headbyte, 1, 1, file), 1);
192
193 if (headbyte >= 0)
194 {
195 if (i + headbyte > size)
196 return READ_COMPRESSED_ERROR_FILE_CORRUPT;
197
198 CHECK_RET(fread(channel + i, headbyte + 1, 1, file), 1);
199
200 i += headbyte + 1;
201 }
202 else if (headbyte >= -127 && headbyte <= -1)
203 {
204 int run;
205
206 CHECK_RET(fread(&c, 1, 1, file), 1);
207
208 run = c;
209 /* if (run == -1) */
210 /* return READ_COMPRESSED_ERROR_FILE_READ_ERROR; */
211
212 if (i + (-headbyte + 1) > size)
213 return READ_COMPRESSED_ERROR_FILE_CORRUPT;
214
215 memset(channel + i, run, -headbyte + 1);
216 i += -headbyte + 1;
217 }
218 }
219
220#undef CHECK_RET
221
222 return READ_COMPRESSED_SUCCESS;
223}
224
225
226Eina_Bool
227psd_get_data(Image_Entry *ie __UNUSED__,
228 PSD_Header *head,
229 FILE *f,
230 unsigned char *buffer, Eina_Bool compressed,
231 int *error)
232{
233 unsigned int c, x, y, numchan, bps, bpc, bpp;
234 unsigned int pixels_count;
235 unsigned char *channel = NULL;
236 unsigned char *data = NULL;
237
238 // Added 01-07-2009: This is needed to correctly load greyscale and
239 // paletted images.
240 switch (head->mode)
241 {
242 case PSD_GREYSCALE:
243 case PSD_INDEXED:
244 numchan = 1;
245 break;
246 default:
247 numchan = 3;
248 }
249
250 bpp = head->channels;
251 bpc = head->depth / 8;
252 pixels_count = head->width * head->height;
253
254 data = malloc(sizeof (unsigned char) * pixels_count * bpp);
255 if (!data) return EINA_FALSE;
256
257 channel = malloc(sizeof (unsigned char) * pixels_count * bpc);
258 if (!channel)
259 {
260 free(data);
261 return EINA_FALSE;
262 }
263
264 bps = head->width * head->channels * bpc;
265 // @TODO: Add support for this in, though I have yet to run across a .psd
266 // file that uses this.
267 if (compressed && bpc == 2)
268 {
269 free(data);
270 free(channel);
271 fprintf(stderr, "unsupported file format.\n");
272 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
273 return EINA_FALSE;
274 }
275
276#define CHECK_RET(Call, Value) \
277 if (Call != Value) \
278 { \
279 free(data); \
280 free(channel); \
281 return EINA_FALSE; \
282 }
283
284 if (!compressed)
285 {
286 if (bpc == 1)
287 {
288 for (c = 0; c < numchan; c++)
289 {
290 unsigned char *tmp = channel;
291
292 CHECK_RET(fread(tmp, pixels_count, 1, f), 1);
293
294 for (y = 0; y < head->height * bps; y += bps)
295 {
296 for (x = 0; x < bps; x += bpp, tmp++)
297 {
298 data[y + x + c] = *tmp;
299 }
300 }
301 }
302
303 // Accumulate any remaining channels into a single alpha channel
304 //@TODO: This needs to be changed for greyscale images.
305 for (; c < head->channels; c++)
306 {
307 unsigned char *tmp = channel;
308
309 CHECK_RET(fread(channel, pixels_count, 1, f), 1);
310
311 for (y = 0; y < head->height * bps; y += bps)
312 {
313 for (x = 0; x < bps; x += bpp, tmp++)
314 {
315 unsigned short newval;
316
317 // previous formula was : (old / 255 * new / 255) * 255
318 newval = (*tmp) * data[y + x + 3];
319
320 data[y + x + 3] = newval >> 8;
321 }
322 }
323 }
324 }
325 else
326 {
327 int bps2;
328
329 bps2 = bps / 2;
330
331 // iCurImage->Bpc == 2
332 for (c = 0; c < numchan; c++)
333 {
334 unsigned short *shortptr = (unsigned short*) channel;
335
336 CHECK_RET(fread(channel, pixels_count * 2, 1, f), 1);
337
338 for (y = 0; y < head->height * bps2; y += bps2)
339 {
340 for (x = 0; x < (unsigned int)bps2; x += bpp, shortptr++)
341 {
342 ((unsigned short*)data)[y + x + c] = *shortptr;
343 }
344 }
345 }
346
347 // Accumulate any remaining channels into a single alpha channel
348 //@TODO: This needs to be changed for greyscale images.
349 for (; c < head->channels; c++)
350 {
351 unsigned short *shortptr = (unsigned short*) channel;
352
353 CHECK_RET(fread(channel, pixels_count * 2, 1, f), 1);
354
355 for (y = 0; y < head->height * bps2; y += bps2)
356 {
357 for (x = 0; x < (unsigned int)bps2; x += bpp, shortptr)
358 {
359 unsigned int newval;
360
361 newval = *shortptr * ((unsigned short*)data)[y + x + 3];
362
363 ((unsigned short*)data)[y + x + 3] = newval >> 16;
364 }
365 }
366 }
367 }
368 }
369 else
370 {
371 unsigned short *rle_table;
372 unsigned int *chanlen;
373
374 rle_table = alloca(head->height * head->channel_num * sizeof (unsigned short));
375 chanlen = alloca(head->channel_num * sizeof (unsigned int));
376 if (!get_compressed_channels_length(head, f, rle_table, chanlen))
377 goto file_read_error;
378
379 for (c = 0; c < numchan; c++)
380 {
381 unsigned char *tmp = channel;
382 int err;
383
384 err = read_compressed_channel(f,
385 chanlen[c],
386 pixels_count,
387 channel);
388 if (err == READ_COMPRESSED_ERROR_FILE_CORRUPT)
389 goto file_corrupt;
390 else if (err == READ_COMPRESSED_ERROR_FILE_READ_ERROR)
391 goto file_read_error;
392
393 for (y = 0; y < head->height * bps; y += bps)
394 {
395 for (x = 0; x < bps; x += bpp, tmp++)
396 {
397 data[y + x + c] = *tmp;
398 }
399 }
400 }
401
402 // Initialize the alpha channel to solid
403 //@TODO: This needs to be changed for greyscale images.
404 if (head->channels >= 4)
405 {
406 for (y = 0; y < head->height * bps; y += bps)
407 {
408 for (x = 0; x < bps; x += bpp)
409 {
410 data[y + x + 3] = 255;
411 }
412 }
413
414 for (; c < head->channels; c++)
415 {
416 unsigned char *tmp = channel;
417 int err;
418
419 err = read_compressed_channel(f,
420 chanlen[c],
421 pixels_count,
422 channel);
423 if (err == READ_COMPRESSED_ERROR_FILE_CORRUPT)
424 goto file_corrupt;
425 else if (err == READ_COMPRESSED_ERROR_FILE_READ_ERROR)
426 goto file_read_error;
427
428 for (y = 0; y < head->height * bps; y += bps)
429 {
430 for (x = 0; x < bps; x += bpp, tmp++)
431 {
432 unsigned short newval;
433
434 newval = *tmp * data[y + x + 3];
435
436 data[y + x + 3] = newval >> 8;
437 }
438 }
439 }
440 }
441 }
442
443 if (bpp == 3)
444 {
445 for (x = 0; x < pixels_count; x++)
446 {
447 buffer[x * 4 + 0] = data[x * 3 + 2];
448 buffer[x * 4 + 1] = data[x * 3 + 1];
449 buffer[x * 4 + 2] = data[x * 3 + 0];
450 buffer[x * 4 + 3] = 255;
451 }
452 }
453 else
454 {
455 // BRGA to RGBA
456 for (x= 0; x < pixels_count; x++)
457 {
458 buffer[x * 4 + 0] = data[x * 4 + 2];
459 buffer[x * 4 + 1] = data[x * 4 + 1];
460 buffer[x * 4 + 2] = data[x * 4 + 0];
461 buffer[x * 4 + 3] = data[x * 4 + 3];
462 }
463 }
464
465 free(channel);
466 free(data);
467 return EINA_TRUE;
468
469#undef CHECK_RET
470
471 file_corrupt:
472 *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
473
474 file_read_error:
475 free(channel);
476 free(data);
477
478 return EINA_FALSE;
479}
480
481
482Eina_Bool
483get_single_channel(Image_Entry *ie __UNUSED__,
484 PSD_Header *head,
485 FILE *f,
486 unsigned char *buffer,
487 Eina_Bool compressed)
488{
489 unsigned int i, bpc;
490 unsigned short *tmp;
491 char headbyte;
492 int c;
493 int pixels_count;
494
495 tmp = (unsigned short*)buffer;
496 bpc = (head->depth / 8);
497 pixels_count = head->width * head->height;
498
499#define CHECK_RET(Call, Value) \
500 if (Call != Value) return EINA_FALSE;
501
502 if (!compressed)
503 {
504 if (bpc == 1)
505 {
506 CHECK_RET(fread(buffer, pixels_count, 1, f), 1);
507 }
508 else
509 { // Bpc == 2
510 CHECK_RET(fread(buffer, pixels_count * 2, 1, f), 1);
511 }
512 }
513 else
514 {
515 for (i = 0; i < (unsigned int)pixels_count; )
516 {
517 CHECK_RET(fread(&headbyte, 1, 1, f), 1);
518
519 if (headbyte >= 0)
520 { // && HeadByte <= 127
521 CHECK_RET(fread(buffer + i, headbyte + 1, 1, f), 1);
522
523 i += headbyte + 1;
524 }
525 if (headbyte >= -127 && headbyte <= -1)
526 {
527 int run;
528
529 CHECK_RET(fread(&c, 1, 1, f), 1);
530
531 run = c;
532 if (run == -1) return EINA_FALSE;
533
534 memset(buffer + i, run, -headbyte + 1);
535 i += -headbyte + 1;
536 }
537 }
538 }
539
540#undef CHECK_RET
541
542 return EINA_TRUE;
543}
544
545Eina_Bool
546read_psd_grey(Image_Entry *ie, PSD_Header *head, FILE * f, int *error)
547{
548 unsigned int color_mode, resource_size, misc_info;
549 unsigned short compressed;
550 unsigned int type;
551 void *surface = NULL;
552
553 *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
554
555#define CHECK_RET(Call, Value) \
556 if (Call != Value) return EINA_FALSE;
557
558 CHECK_RET(read_uint(f, &color_mode), 1);
559 // Skip over the 'color mode data section'
560 CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0);
561
562 CHECK_RET(read_uint(f, &resource_size), 1);
563 // Read the 'image resources section'
564
565 CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0);
566
567 CHECK_RET(read_uint(f, &misc_info), 1);
568 CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0);
569
570 CHECK_RET(read_ushort(f, &compressed), 1);
571
572 ie->w = head->width;
573 ie->h = head->height;
574 if (head->channels == 3) ie->flags.alpha = 0;
575 else ie->flags.alpha = 1;
576
577 head->channel_num = head->channels;
578 // Temporary to read only one channel...some greyscale .psd files have 2.
579 head->channels = 1;
580
581 switch (head->depth)
582 {
583 case 8:
584 type = 1;
585 break;
586 case 16:
587 type = 2;
588 break;
589 default:
590 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
591 return EINA_FALSE;
592 }
593
594 evas_cache_image_surface_alloc(ie, ie->w, ie->h);
595 surface = evas_cache_image_pixels(ie);
596 if (!surface)
597 {
598 *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
599 goto cleanup_error;
600 }
601
602 if (!psd_get_data(ie, head, f, surface, compressed, error))
603 goto cleanup_error;
604
605 return EINA_TRUE;
606
607#undef CHECK_RET
608
609 cleanup_error:
610 return EINA_FALSE;
611}
612
613
614Eina_Bool
615read_psd_indexed(Image_Entry *ie, PSD_Header *head, FILE * f, int *error)
616{
617 unsigned int color_mode, resource_size, misc_info;
618 unsigned short compressed;
619 void *surface;
620
621 *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
622
623#define CHECK_RET(Call, Value) \
624 if (Call != Value) return EINA_FALSE;
625
626 CHECK_RET(read_uint(f, &color_mode), 1);
627 CHECK_RET((color_mode % 3), 0);
628 /*
629 Palette = (unsigned char*)malloc(Colormode);
630 if (Palette == NULL)
631 return EINA_FALSE;
632 if (fread(&Palette, 1, Colormode, file) != Colormode)
633 goto cleanup_error;
634 */
635 // Skip over the 'color mode data section'
636 CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0);
637
638 // Read the 'image resources section'
639 CHECK_RET(read_uint(f, &resource_size), 1);
640 CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0);
641
642 CHECK_RET(read_uint(f, &misc_info), 1);
643 CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0);
644
645 CHECK_RET(read_ushort(f, &compressed), 1);
646
647 if (head->channels != 1 || head->depth != 8)
648 {
649 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
650 return EINA_FALSE;
651 }
652 head->channel_num = head->channels;
653
654 ie->w = head->width;
655 ie->h = head->height;
656 if (head->channels == 3) ie->flags.alpha = 0;
657 else ie->flags.alpha = 1;
658
659 evas_cache_image_surface_alloc(ie, ie->w, ie->h);
660 surface = evas_cache_image_pixels(ie);
661 if (!surface)
662 {
663 *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
664 return EINA_FALSE;
665 }
666
667 if (!psd_get_data(ie, head, f, surface, compressed, error))
668 return EINA_FALSE;
669 return EINA_TRUE;
670
671#undef CHECK_RET
672}
673
674Eina_Bool
675read_psd_rgb(Image_Entry *ie, PSD_Header *head, FILE *f, int *error)
676{
677 unsigned int color_mode, resource_size, misc_info;
678 unsigned short compressed;
679 unsigned int type;
680 void *surface;
681
682#define CHECK_RET(Call, Value) \
683 if (Call != Value) return EINA_FALSE;
684
685 CHECK_RET(read_uint(f, &color_mode), 1);
686 // Skip over the 'color mode data section'
687 CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0);
688
689 // Read the 'image resources section'
690 CHECK_RET(read_uint(f, &resource_size), 1);
691 CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0);
692
693 CHECK_RET(read_uint(f, &misc_info), 1);
694 CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0);
695
696 CHECK_RET(read_ushort(f, &compressed), 1);
697
698 head->channel_num = head->channels;
699
700 switch (head->depth)
701 {
702 case 8:
703 type = 1;
704 break;
705 case 16:
706 type = 2;
707 break;
708 default:
709 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
710 return EINA_FALSE;
711 }
712 ie->w = head->width;
713 ie->h = head->height;
714 if (head->channels == 3) ie->flags.alpha = 0;
715 else ie->flags.alpha = 1;
716
717 evas_cache_image_surface_alloc(ie, ie->w, ie->h);
718 surface = evas_cache_image_pixels(ie);
719 if (!surface)
720 {
721 *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
722 goto cleanup_error;
723 }
724
725 if (!psd_get_data(ie, head, f, surface, compressed, error))
726 goto cleanup_error;
727
728 evas_common_image_premul(ie);
729 return EINA_TRUE;
730
731#undef CHECK_RET
732
733 cleanup_error:
734 return EINA_FALSE;
735}
736
737Eina_Bool
738read_psd_cmyk(Image_Entry *ie, PSD_Header *head, FILE *f, int *error)
739{
740 unsigned int color_mode, resource_size, misc_info, size, i, j, data_size;
741 unsigned short compressed;
742 unsigned int format, type;
743 unsigned char *kchannel = NULL;
744 void *surface;
745
746 *error = EVAS_LOAD_ERROR_CORRUPT_FILE;
747
748#define CHECK_RET(Call, Value) \
749 if (Call != Value) return EINA_FALSE;
750
751 CHECK_RET(read_uint(f, &color_mode), 1);
752 // Skip over the 'color mode data section'
753 CHECK_RET(fseek(f, color_mode, SEEK_CUR), 0);
754
755 CHECK_RET(read_uint(f, &resource_size), 1);
756 // Read the 'image resources section'
757 CHECK_RET(fseek(f, resource_size, SEEK_CUR), 0);
758
759 CHECK_RET(read_uint(f, &misc_info), 1);
760 CHECK_RET(fseek(f, misc_info, SEEK_CUR), 0);
761
762 CHECK_RET(read_ushort(f, &compressed), 1);
763
764 switch (head->channels)
765 {
766 case 4:
767 format = 0x1907;
768 head->channel_num = 4;
769 head->channels = 3;
770 break;
771 case 5:
772 format = 0x1908;
773 head->channel_num = 5;
774 head->channels = 4;
775 break;
776 default:
777 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
778 return EINA_FALSE;
779 }
780
781 switch (head->depth)
782 {
783 case 8:
784 type = 1;
785 break;
786 case 16:
787 type = 2;
788 break;
789 default:
790 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
791 return EINA_FALSE;
792 }
793
794 ie->w = head->width;
795 ie->h = head->height;
796 if (head->channels == 3) ie->flags.alpha = 0;
797 else ie->flags.alpha = 1;
798
799 evas_cache_image_surface_alloc(ie, ie->w, ie->h);
800 surface = evas_cache_image_pixels(ie);
801 if (!surface)
802 {
803 *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
804 goto cleanup_error;
805 }
806
807 if (!psd_get_data(ie, head, f, surface, compressed, error))
808 goto cleanup_error;
809
810 size = type * ie->w * ie->h;
811 kchannel = malloc(size);
812 if (kchannel == NULL)
813 goto cleanup_error;
814 if (!get_single_channel(ie, head, f, kchannel, compressed))
815 goto cleanup_error;
816
817 data_size = head->channels * type * ie->w * ie->h;
818 if (format == 0x1907)
819 {
820 unsigned char *tmp = surface;
821 const unsigned char *limit = tmp + data_size;
822
823 for (i = 0, j = 0; tmp < limit; tmp++, j++)
824 {
825 int k;
826
827 for (k = 0; k < 3; k++)
828 *tmp = (*tmp * kchannel[j]) >> 8;
829
830 // FIXME: tmp[i+3] = 255;
831 }
832 }
833 else
834 { // RGBA
835 unsigned char *tmp = surface;
836 const unsigned char *limit = tmp + data_size;
837
838 // The KChannel array really holds the alpha channel on this one.
839 for (i = 0, j = 0; tmp < limit; tmp += 4, j++)
840 {
841 tmp[0] = (tmp[0] * tmp[3]) >> 8;
842 tmp[1] = (tmp[1] * tmp[3]) >> 8;
843 tmp[2] = (tmp[2] * tmp[3]) >> 8;
844 tmp[3] = kchannel[j]; // Swap 'K' with alpha channel.
845 }
846 }
847
848 free(kchannel);
849
850 evas_common_image_premul(ie);
851 return EINA_TRUE;
852
853 cleanup_error:
854 free(kchannel);
855 return EINA_FALSE;
856}
857
858static Eina_Bool
859evas_image_load_file_data_psd(Image_Entry *ie,
860 const char *file,
861 const char *key __UNUSED__,
862 int *error)
863{
864 FILE *f;
865 PSD_Header header;
866 Eina_Bool bpsd = EINA_FALSE;
867
868 f = fopen(file, "rb");
869 if (f == NULL)
870 {
871 *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
872 return bpsd;
873 }
874
875 if (!psd_get_header(&header, f) || !is_psd(&header))
876 {
877 fclose(f);
878 *error = EVAS_LOAD_ERROR_GENERIC;
879 return EINA_FALSE;
880 }
881
882 ie->w = header.width;
883 ie->h = header.height;
884
885 *error = EVAS_LOAD_ERROR_NONE;
886
887 switch (header.mode)
888 {
889 case PSD_GREYSCALE: // Greyscale
890 bpsd = read_psd_grey(ie, &header, f, error);
891 break;
892 case PSD_INDEXED: // Indexed
893 bpsd = read_psd_indexed(ie, &header, f, error);
894 break;
895 case PSD_RGB: // RGB
896 bpsd = read_psd_rgb(ie, &header, f, error);
897 break;
898 case PSD_CMYK: // CMYK
899 bpsd = read_psd_cmyk(ie, &header, f, error);
900 break;
901 default :
902 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
903 bpsd = EINA_FALSE;
904 }
905 fclose(f);
906
907 return bpsd;
908}
909
910static Eina_Bool
911get_compressed_channels_length(PSD_Header *head,
912 FILE * file,
913 unsigned short *rle_table,
914 unsigned int *chanlen)
915{
916 unsigned int j;
917 unsigned int c;
918
919 if (fread(rle_table,
920 sizeof(unsigned short),
921 head->height * head->channel_num,
922 file) != head->height * head->channel_num)
923 return EINA_FALSE;
924
925 memset(chanlen, 0, head->channel_num * sizeof(unsigned int));
926 for (c = 0; c < head->channel_num; c++)
927 {
928 unsigned int i;
929
930 j = c * head->height;
931 for (i = 0; i < head->height; i++)
932 {
933 chanlen[c] += rle_table[i + j];
934 }
935 }
936
937 return EINA_TRUE;
938}
939
940static const Evas_Image_Load_Func evas_image_load_psd_func = {
941 EINA_TRUE,
942 evas_image_load_file_head_psd,
943 evas_image_load_file_data_psd,
944 NULL
945};
946
947static int
948module_open(Evas_Module *em)
949{
950 if (!em) return 0;
951 em->functions = (void *)(&evas_image_load_psd_func);
952 return 1;
953}
954
955static void
956module_close(Evas_Module *em __UNUSED__)
957{
958}
959
960static Evas_Module_Api evas_modapi =
961 {
962 EVAS_MODULE_API_VERSION,
963 "psd",
964 "none",
965 {
966 module_open,
967 module_close
968 }
969 };
970
971EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_IMAGE_LOADER, image_loader, psd);
972
973
974#ifndef EVAS_STATIC_BUILD_PSD
975EVAS_EINA_MODULE_DEFINE(image_loader, psd);
976#endif